스프링부트 3.0 버전을 이용하려고 starter에서 다운받고 인텔리제이에서 빌드하는데 해당 오류가 발생했다.
원인은 3.0 이상 버전부터는 자바17버전을 사용해야 하기 때문!
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.0.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.0
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.0 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.5.1' but:
- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11
- Other compatible attribute:
setting과 project structure를 해당과 같이 바꿔주고 빌드시키니 잘 돌아갔다!