[에러] 스프링 java 버전 에러
문제
에러 코드 메시지
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:
- 대충 해석하자면, 너 프로젝트 자바 버전은 11이야. 근데 ...
원인
김영한 님의 스프링 인강 실습을 따라 가면서 Spring Boot 버전은 3.0.2 , Java 버전을 11 로 설정하여 인텔리제이로 열었더니
위와 같은 문제가 나왔다.
해결
스택오버플로우에
in intelliJ spring boot gradle plugin 3.0.0 no matching variant found - Stack Overflow
in intelliJ spring boot gradle plugin 3.0.0 no matching variant found
I'm trying to use version 3.0.0 of the spring boot Gradle plugin. Here's my build.gradle.kts file: import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("org.springframework...
stackoverflow.com
찾아보니 프로젝트 자바버전을 11 -> 17 로 바꾸어서 설정했더니 해결됐다 .!
자바 버전 설정은 이전에 포스팅 한적 있으니 참고 하시면 되겠다.
[IntelliJ/에러] 자바 스프링 초기 환경 설정 에러project JDK is not defined (tistory.com)
[IntelliJ/에러] 자바 스프링 초기 환경 설정 에러project JDK is not defined
문제 start.spring.io 를 이용해 스프링 부트 프로젝트 생성 이후 빌드도 안되고 위와 같은 화면이 나온다. 원인 인텔리제이 초기 설정시 jdk 세팅을 안 해주었다. jdk 에 대해서는 추후 포스팅 하겠다.
0713k.tistory.com