plugins { id 'org.springframework.boot' version '2.1.7.RELEASE' id 'io.spring.dependency-management' version '1.0.7.RELEASE' id 'java' } group = 'com.gaialab' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8' repositories { mavenCentral() } ext { set('springCloudVersion', "Greenwich.SR2") } dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' testImplementation 'org.springframework.boot:spring-boot-starter-test'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.1.7.RELEASE' } dependencyManagement { imports { mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" } }
缺少 spring-boot-starter-web 会启动不起来