buildscript { repositories { mavenCentral()//依赖Maven仓库 } dependencies { //使用1.4.2.RELEASE版本的Spring框架 classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.3.RELEASE") } } apply plugin: 'java' apply plugin: 'spring-boot' //生成的jar包包名和版本 jar { baseName = 'gs-rest-service' version = '0.1.0' } repositories { mavenCentral() } //设置jdk的版本 sourceCompatibility = 1.8 targetCompatibility = 1.8 //添加编译时的依赖 dependencies { compile("org.springframework.boot:spring-boot-starter-web") testCompile('org.springframework.boot:spring-boot-starter-test') }
Gradle spring boot
最新推荐文章于 2023-11-05 15:44:44 发布