JAVA version : 11
Spring boot : 3.1.5
A problem occurred configuring root project 'hello-spring'. Could not resolve all files for configuration ':classpath'. Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.2. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.2 No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.2 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6' but: ...
에러 원인 :
Spring boot 버전은 3.x인데, Java 버전을 11로 하여 발생한 에러이다.
Spring boot 3.x버전 이후로는 Java 버전 17 버전부터 지원한다.
해결 방법:
Spring boot 버전을 2.x으로 낮춰서 사용하거나, Java 버전을 17 버전으로 업데이트하여 사용한다.