idea modified setting-gradel
build.gradel file configuration
// buildscript must be at the top, note the location
buildscript {
repositories {
// priority use of domestic sources
maven { url 'https://maven.aliyun.com/repository/public' }
mavenCentral()
}
dependencies {
// make spring-boot support gradle
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.1.1.RELEASE")
}
}
plugins {
id 'java'
id 'org.springframework.boot' version '2.1.1.RELEASE'
}
apply plugin: 'java'
apply plugin: 'idea'
// use spring boot
apply plugin: "org.springframework.boot"
// use automatic dependency management of spring boot
apply plugin: 'io.spring.dependency-management'
group 'com.genew.nuas'
version '1.0-SNAPSHOT'
// Specify java version
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
// use of domestic sources
maven { url 'https://maven.aliyun.com/repository/public' }
mavenCentral()
}
// dependency list
dependencies {
compile 'org.springframework.boot:spring-boot-starter-web'
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
Plus spring boot can start with a simple spring boot of the project