代码拉取完成,页面将自动刷新
同步操作将从 摆码王子/FS-Blog 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
buildscript {
ext {
gradleDockerVersion = '1.2'
springBootVersion = '1.5.8.RELEASE'
ehcacheVersion = '2.10.4'
mysqlConnectorVersion = '5.1.44'
lombokVersion = '1.16.18'
mybatisVersion = '3.4.5'
mybatisStarterVersion = '1.3.0'
hikariCPVersion = '2.5.1'
commonMapperVersion = '3.4.4'
commonsIOVersion = '2.4'
commonsLangversion = '3.7'
commonsCodecVersion = '1.11'
fastJsonVersion = '1.2.41'
}
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenCentral()
maven { url "http://repo.spring.io/release" }
maven { url "http://repo.spring.io/milestone" }
maven { url "http://repo.spring.io/snapshot" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
// Gradle-docker 插件
classpath("se.transmode.gradle:gradle-docker:${gradleDockerVersion}")
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse-wtp'
apply plugin: 'org.springframework.boot'
apply plugin: 'docker' // end::plugin[] // This is used as the docker image prefix (org) group = 'gregturn'
group = 'me.zbl'
version = '1.0-Release'
sourceCompatibility = 1.8
bootRun {
addResources = true
}
jar {
baseName = 'fsblog'
}
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenCentral()
maven { url "http://repo.spring.io/release" }
maven { url "http://repo.spring.io/milestone" }
maven { url "http://repo.spring.io/snapshot" }
}
configurations {
providedRuntime
compile.exclude group: 'ch.qos.logback'
mybatisGenerator
}
dependencies {
//security
//compile("org.springframework.boot:spring-boot-starter-security:${springBootVersion}")
//web
compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
//aop
compile("org.springframework.boot:spring-boot-starter-aop:${springBootVersion}")
//jdbc
compile("org.springframework.boot:spring-boot-starter-jdbc:${springBootVersion}")
//模板引擎
compile("org.springframework.boot:spring-boot-starter-freemarker:${springBootVersion}")
//日志
compile("org.springframework.boot:spring-boot-starter-log4j2:${springBootVersion}")
//缓存
compile("net.sf.ehcache:ehcache:${ehcacheVersion}")
//数据库驱动
compile("mysql:mysql-connector-java:${mysqlConnectorVersion}")
//连接池
compile("com.zaxxer:HikariCP:${hikariCPVersion}")
//ORM
compile("org.mybatis:mybatis:${mybatisVersion}")
compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatisStarterVersion}")
//lombok插件
compile("org.projectlombok:lombok:${lombokVersion}")
//
compile 'com.lmax:disruptor:3.3.6'
//common mapper
compile("tk.mybatis:mapper:${commonMapperVersion}")
//mybatis-generator-core
mybatisGenerator 'org.mybatis.generator:mybatis-generator-core:1.3.5'
//mybatis-common-mapper-generator
mybatisGenerator 'tk.mybatis:mapper:3.4.4'
//mybatis-mysql驱动
mybatisGenerator "mysql:mysql-connector-java:${mysqlConnectorVersion}"
//运行环境(采用 jar 部署的方式时需要)
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat:${springBootVersion}")
//测试
testCompile("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
//热部署
compile("org.springframework.boot:spring-boot-devtools:${springBootVersion}")
//commons-io
compile("commons-io:commons-io:${commonsIOVersion}")
//commons-lang3
compile("org.apache.commons:commons-lang3:${commonsLangversion}")
//commons-codec
compile("commons-codec:commons-codec:${commonsCodecVersion}")
//fast-json
compile("com.alibaba:fastjson:$fastJsonVersion")
}
/* mybatisGenerator */
def getDbProperties = {
def properties = new Properties()
file("src/main/resources/mybatisGenerator/config.properties").withInputStream { inputStream ->
properties.load(inputStream)
}
properties
}
task mybatisGenerate << {
def properties = getDbProperties()
ant.properties['targetProject'] = projectDir.path
ant.properties['driverClass'] = properties.getProperty("jdbc.driverClassName")
ant.properties['connectionURL'] = properties.getProperty("jdbc.url")
ant.properties['userId'] = properties.getProperty("jdbc.username")
ant.properties['password'] = properties.getProperty("jdbc.password")
ant.properties['src_main_java'] = sourceSets.main.java.srcDirs[0].path
ant.properties['src_main_resources'] = sourceSets.main.resources.srcDirs[0].path
ant.properties['modelPackage'] = properties.getProperty("package.model")
ant.properties['mapperPackage'] = properties.getProperty("package.mapper")
ant.properties['sqlMapperPackage'] = properties.getProperty("package.xml")
ant.taskdef(
name: 'mbgenerator',
classname: 'org.mybatis.generator.ant.GeneratorAntTask',
classpath: configurations.mybatisGenerator.asPath
)
ant.mbgenerator(overwrite: true,
configfile: 'src/main/resources/mybatisGenerator/generatorConfig.xml', verbose: true) {
propertyset {
propertyref(name: 'targetProject')
propertyref(name: 'userId')
propertyref(name: 'driverClass')
propertyref(name: 'connectionURL')
propertyref(name: 'password')
propertyref(name: 'src_main_java')
propertyref(name: 'src_main_resources')
propertyref(name: 'modelPackage')
propertyref(name: 'mapperPackage')
propertyref(name: 'sqlMapperPackage')
}
}
}
// tag::task[]
task buildDocker(type: Docker, dependsOn: build) {
push = true
applicationName = jar.baseName
dockerfile = file('Dockerfile')
doFirst {
copy {
from jar
into stageDir
}
}
}
// end::task[]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。