springboots 配置文件

1.build.gradle

buildscript {
  // 声明变量 ext { springBootVersion = '1.5.2.RELEASE' }
  // 仓库 repositories { mavenCentral() }
  // 依赖 dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' group = 'com.song.spring.boot.blog' version = '1.0.0' sourceCompatibility = 1.8 // 仓库 repositories { mavenCentral() } // 依赖 dependencies { compile('org.springframework.boot:spring-boot-starter-web') testCompile('org.springframework.boot:spring-boot-starter-test') }

2.gradlew 在线编译(可以不下载gradle安装包,在线可编译)

   和gradle/wrapper/gradle-wrapper.properties一起使用

  gradle-wrapper.properties 比较重要的代码:distributionUrl=https://services.gradle.org/distributions/gradle-4.8.1-bin.zip 随需求可已改

  编译命令: gradlew build (比下载gradle之后的编译命令多了一个w)

3.settings.gradle 

  工程名称

原文地址:https://www.cnblogs.com/xiaoyezi/p/9295164.html