源码下载:https://download.csdn.net/download/salarzl/10812973
1、IntelliJ 创建Gradle java项目
2、修改build.gradle文件内容如下:
//应用插件
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'org.unbroken-dome.test-sets'
apply plugin: 'war'
//jdk版本
sourceCompatibility = 1.8
targetCompatibility = 1.8
//构建脚本
buildscript {
repositories {
jcenter()
}
dependencies {
classpath(
'org.springframework.boot:spring-boot-gradle-plugin:1.4.0.RELEASE',
'org.unbroken-dome.gradle-plugins:gradle-testsets-plugin:1.0.2'
)
}
}
//使用maven仓库
reposito