用gradle构建时,出现报错(我用的版本7.4)
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
解决:
需要在后面添加版本号(我百度时,其他博客不用版本号也能构建。刚开始学,不知道是不是版本的区别)
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web:2.5.6'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.5.6'
}