A problem occurred configuring root project 'first'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.2.3.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.3
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.2.3 was found. The consumer was configured to find a library for use during runtime, compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.6' but:
- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.3 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.3 declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.3 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.3 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.3 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.3 declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
블라블라~
어찌되었던 호환성이 안맞는다는 얘기다.
하나씩 찾아봐야한다.
자바 버전은 무엇인지, spring boot 버전은 무엇인지, gradle 버전은 무엇인지, 인텔리제이 버전은 무엇인지!
만들고자 했던 프로젝트 버전
java21 + spring boot 3.2 + Gradle
🔶 자바 버전
인텔리제이에서
File > Project Structure > Project Settings > Project > SDK
Download JDK > Version = 21
로 설정 후 원하는 디렉토리에 원하는 것으로 다운받는다.Language level
확인Language level
에 21이 없다면 해당 인텔리제이 버전에서는 21을 지원하지 않는 것이므로 new version의 인텔리제이를 다운로드하여 새로운 버전의 인텔리제이에서 실행한다.🔶 spring boot 버전
build.gradle
에서 확인해보자!
id 'org.springframework.boot' version '3.2.3'
를 보니 3.2.3 버전인 것을 알 수 있다.
java21 => spring boot 3.2 버전으로 다운받기를 권한다.
🔶 gradle 버전
gradle > gradle-wrapper.properties > distributionUrl
확인하기IntelliJ IDEA > Settings > Build,Execution,Deployment > Build Tools > Gradle
확인하기🔶 intelliJ IDEA 버전
위에서 언급했듯 최신 버전의 인텔리제이가 아니면 java21을 지원하지 않는다.
https://www.jetbrains.com/ko-kr/idea/whatsnew/
2023.3 릴리즈 이전의 버전이라면 새로 다운받아 사용하자!