인프런 커뮤니티 질문&답변

kks9612161님의 프로필 이미지

작성한 질문수

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

계속 스프링부트 실행에 오류가 납니다

해결된 질문

23.12.03 14:50 작성

·

1.5K

·

수정됨

1

알려주신대로 설정하였고 , 초기 설정을 하였는데 저런 오류가 계속 납니다 자바 sdk는 java17로 설정해두었습니다 오류는 A problem occurred configuring root project 'jpashop'.

> Could not resolve all files for configuration ':classpath'.

> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.1.6.

Required by:

project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.1.6

> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.1.6 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.5' but:

- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.6 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.5')

- Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.6 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.5')

- Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.1.6 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.5')

 

 

입니다

답변 1

0

예컨데님의 프로필 이미지

2023. 12. 03. 15:52

image

  • 설정 -> 빌드, 실행, 배포 -> 빌드 도구 -> Gradle

  • Gradle JVM 의 SDK 값이 잘 설정되어있는지 확인 부탁드립니다.

 

image

  • 설정 -> 빌드, 실행, 배포 -> 컴파일러 -> Java 컴파일러

  • 위의 설정에서 프로젝트 바이트코드 버전 값이 잘 설정되었는지 확인 부탁드립니다.

image

  • 프로젝트 구조의 sdk 가 잘 설정되었는지 확인 부탁드립니다.