인프런 커뮤니티 질문&답변
서버 구동이 안됩니다.
작성
·
116
·
수정됨
0
1..2일차 영상 보면서...
환경을 만드는데.... 서버 구동이 안됩니다.
초초초보입니다.......

A problem occurred configuring root project 'library-app'.
> 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 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' 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 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a component, 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 8)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional: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 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 declares a runtime of a library, 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 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a library, 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 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a component, 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 8)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
답변 3
0
안녕하세요! 🙂 제가 보기에도 Java 8 버전을 사용하고 계셔서 Spring Boot 3 버전과 호환되지 않는 것 같습니다! (약간 비유하자면, 오래된 고전 게임이 요즘 윈도우에서 돌아가지 않는 것과 비슷합니다)
환경 잡는게 참 어렵죠 ㅎㅎㅎ.. 꼭 해결하셨으면 좋겠습니다. 감사합니다. 🙇
0
0
안녕하세요, 인프런 AI 인턴입니다.
lchjjjs10004님, 서버 구동에 어려움을 겪고 계시는 것 같아 도움을 드리고자 합니다. 질문에서 언급하신 오류는 Spring Boot 3.0.1 버전과 Java 8 버전 간의 호환성 문제로 보입니다. Spring Boot 3.x 버전은 기본적으로 Java 17 이상을 필요로 하기 때문에, 현재의 설정으로는 호환되지 않아 오류가 발생하고 있습니다.
이 문제를 해결하기 위해 두 가지 방법을 제안합니다:
- JDK 버전을 17 이상으로 업그레이드: 현재 프로젝트 설정이 Java 17 이상의 버전을 필요로 하고 있으므로 JDK를 해당 버전으로 업데이트 해보세요. Java 17을 설치한 후 프로젝트 구성을 다시 시도하시면 도움이 될 것입니다. 
- Spring Boot 버전을 낮추기: 만약 Java 17로의 업그레이드가 어려우시다면, Spring Boot의 버전을 Java 8과 호환 가능한 버전으로 낮추는 방법이 있습니다. 예를 들어, Spring Boot 2.7.x 버전은 Java 8과 호환됩니다. - build.gradle파일에서- spring-boot-gradle-plugin의 버전을 2.7.x로 변경해 보세요.
해당 문제와 비슷한 질문이 이미 게시되어 있습니다. 다음 링크들을 참고하시면 문제 해결에 도움이 될 것입니다:
- 스프링 부트 gradle 빌드 오류 - Java 버전 호환성 문제와 관련된 내용입니다.
 
- 스프링부트 버전관련 질문 - 스프링 부트 버전 변경에 관한 유용한 조언이 있습니다.
 
- 스프링 부트 3.0.1 자바 버전 호환성 - 비슷한 상황에서의 해결 사례를 소개합니다.
 
이러한 정보를 통해 문제를 해결하시고, 원활한 학습 경험을 가지시기를 바랍니다.
저는 질문자님의 이해를 돕고자 지식공유자님의 기존 답변을 참고하여 유사한 답변 링크를 추천해드리고 있습니다.
현재 베타 기능으로 답변이 만족스럽지 않을 수 있는 점 양해 부탁드립니다. 🙏
추가적으로 궁금한 점이 있으시면, 이어서 질문해 주세요. 곧 지식공유자께서 답변해 주실 것입니다.







