SpringBoot 3.X 인텔리제이 켜자마자 에러가 발생했을 때 해결 법

2023. 6. 13. 20:44·에러 해결
반응형

진리의 검빨

 

새로운 프로젝트를 실행해보고자 git에서 팀원이 올려놓은 프로젝트를 받아서 실행해보려 했는데 켜자마자 기다렸다는 듯이 에러가 우수수 떨어졌다.

A problem occurred configuring root project 'tooit'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.1.0.
     Required by:
         project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.1.0
      > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.1.0 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.1' but:
          - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.0 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
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1')
반응형

에러 내용 중에 Java가 있어서 Java 버전 문제인 거 같다는 생각이 들었다. 근데 나 3.X 버전대로 이미 다른 프로젝트를 실행해본 적이 있는데....? 일단 스프링부트 3.X 버전부터는 고대에서부터 내려오던 Java 8 버전이나 11을 쓰지 못하고 17부터 사용할 수가 있다. 

그래도 혹시 모르니까 Java 버전을 확인해보긴 해보자.

무려 17도 아니고 19다!

 

Java가 17 버전 미만으로 깔려있지도 않은데..? 

혹시 팀원이 start.spring.io/ 에서 프로젝트를 생성할 때 Java 버전을 잘못 선택했나 싶어 build.gradle에도 방문해봤다.

의심해서 미안해

 

 

이제 마지막으로 인텔리제이 설정을 살펴보자. 검색창에 build 검색 후 

Build, Exeution, Deployment > Build Tools > Gradle 메뉴로 이동해보자.

반응형

 

허 저기 떡하니 17이 아닌 11이 선택되어있다.

 

JDK 버전을 17로 변경해주었다.

반응형

 

그리고 인텔리제이를 재실행하면 에러 없이 잘 로드 된다!

 

정리!

인텔리제이로 스프링부트 3.X 버전이 로드 되지 않을 땐

1. 로컬에 설치된 Java 버전 확인

2. build.gradle Java 버전 확인

3. 인텔리제이 설정 확인

이 순서대로 확인해보면 된다.

반응형
저작자표시 비영리 변경금지 (새창열림)
'에러 해결' 카테고리의 다른 글
  • [SpringBoot] I/O error on GET request for ~ : Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)
  • [SpringBoot] Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true 에러 해결
  • [SpringBoot] message.properties 파일에 한글이 아닌 외계어가 나올 경우 문제 해결
  • [SpringBoot] No message found under code 'hello' for locale 'null'. 에러 해결
데부한
데부한
어차피 할 거면 긍정적으로 하고 싶은 개발자
    반응형
  • 데부한
    동동이개발바닥
    데부한
  • 전체
    오늘
    어제
    • 분류 전체보기 (307)
      • 방통대 컴퓨터과학과 (27)
        • 잡담 (9)
        • 3학년1학기 (17)
      • 프로젝트 및 컨퍼런스 회고 (1)
        • 프로젝트 (4)
        • 한이음 프로젝트 (0)
        • 회고 (3)
      • 공부 (165)
        • Spring (37)
        • JPA (71)
        • 인프런 워밍업 클럽_BE (10)
        • Java (6)
        • React.js (27)
        • 넥사크로 (11)
        • 기타 (3)
      • 알고리즘 (85)
        • 알고리즘 유형 (10)
        • 알고리즘 풀이 (57)
        • SQL 풀이 (18)
      • 에러 해결 (13)
      • 잡담 (7)
        • 국비교육 (2)
        • 구매후기 (5)
        • 진짜 잡담 (0)
  • 블로그 메뉴

    • Github
    • Linkedin
    • 홈
    • 방명록
    • 글쓰기
    • 관리
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    인프런
    알고리즘
    QueryDSL
    IT
    MSA
    프로그래머스
    springboot
    자바스크립트
    코딩테스트
    프론트엔드
    스프링부트
    SpringBoot를 이용한 RESTful Web Service 개발
    react
    SQL
    egov
    토비의스프링부트
    전자정부프레임워크
    넥사크로
    백준
    Java
    방통대
    JPA
    에러해결
    개발자
    운영체제
    Spring
    기출문제
    RESTful
    토이프로젝트
    oracle
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
데부한
SpringBoot 3.X 인텔리제이 켜자마자 에러가 발생했을 때 해결 법
상단으로

티스토리툴바