您的位置:首页 > 编程语言 > Java开发

Spring-boot +Gradle依赖管理+Mybatis 配置文件

2017-12-22 14:02 295 查看
task wrapper(type: Wrapper) {
gradleVersion = '3.5'
}

buildscript {
ext {
springBootVersion = '1.5.6.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}

apply plugin: 'java'
apply plugin: 'org.springframework.boot'

repositories {
mavenCentral()
maven {
credentials {
username 'deploy'
password 'Value888'
}
url 'http://106.14.251.153:18081/nexus/content/repositories/snapshots/'
}
maven {
credentials {
username 'deploy'
password 'Value888'
}
url 'http://106.14.251.153:18081/nexus/content/repositories/releases/'
}
}

configurations {
all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}

dependencies {
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-log4j2'
compile 'org.springframework.boot:spring-boot-starter-actuator'
compile 'org.mybatis.spring.boot:mybatis-spring-boot-starter:1.2.1'
compile "org.springframework.boot:spring-boot-starter-freemarker"
compile 'org.apache.commons:commons-lang3:3.5'
compile 'org.mybatis.generator:mybatis-generator-core:1.3.5'
compile 'org.projectlombok:lombok'
compile "org.apache.httpcomponents:httpclient"
compile 'com.alibaba:druid:1.0.29'
compile 'com.alibaba:fastjson:1.2.29'

runtime files('./src/main/resources/lib/ojdbc6.jar')
testCompile 'org.springframework.boot:spring-boot-starter-test'
}

test {
testLogging {
showStandardStreams = true
}
}

if (!hasProperty('mainClass')) {
ext.mainClass = 'com.ftvalue.customer.CustomerApplication'
}

configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息