Spring

Gradle sync failed: Could not find org.springframework.boot:spring-boot:spring-boot-gradle-plugin 오류 해결

쿠카이든 2022. 2. 28. 14:36
728x90
  • (build.gradle 파일) Gradle 4 버전에서 정상동작을 하였던 아래 코드가 오류가 났을 때
dependencies {
	compile('org.springframework.boot:spring-boot-starter-web')
	testCompile('org.springframework.boot:spring-boot-starter-test')
}
  • 아래와 같이 compile -> implementation, testCompile -> testImplementation 으로 바꾸면 오류가 해소된다.
dependencies {
	implementation('org.springframework.boot:spring-boot-starter-web')
	testImplementation('org.springframework.boot:spring-boot-starter-test')
}
  • 구글 검색 결과 Gradle 4 -> 7로 바뀌면서 문법이 바뀌어서 그렇다는 것을 알 수 있었다.

 

참고1 : https://github.com/jojoldu/freelec-springboot2-webservice/issues/719

참고2 : https://docs.gradle.org/current/userguide/dependency_management_for_java_projects.html#sec:configurations_java_tutorial

728x90