Java 11
Spring Boot 3.0.1
오류 메세지
A problem occurred configuring root project 'shop'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.1 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:
- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 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
해결 방법
Spring Boot 2.x -> Java 11
Spring Boot 3.x -> Java 17
build.gradle 수정
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.8'
id 'io.spring.dependency-management' version '1.1.0'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
'ProblemSolving' 카테고리의 다른 글
| [IntelliJ] 메세지, 국제화 테스트 중 한글 깨짐 (0) | 2022.08.26 |
|---|---|
| [IntelliJ] Java file outside of source root (0) | 2022.08.26 |
| [Servlet] Error creating bean with name 'servletComponentRegisteringPostProcessor' (0) | 2022.08.01 |
| [Querydsl] Execution failed for task ':compileQuerydsl'. com/mysema/codegen/model/Type (0) | 2022.07.07 |
| [Git] refusing to merge unrelated histories (0) | 2022.05.13 |