inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

강의 준비 영상 - 스프링 프로젝트를 시작하는 첫 번째 방법

스프링 부트 3.0.1 자바 버전 호환성

해결된 질문

730

박호정

작성한 질문수 43

1

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 11, 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 11
              - 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 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 '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 11
              - 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 11
              - 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 11
              - 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 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 '7.5')

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.


수업자료로 제공되는 압축파일을 받았는데요. jdk 11 설치 후 gradle sync를 누르면 위와 같은 에러가 나오는데요. 강의 설명에서는 11을 깔라고 하셔서 진행하는데 잘 안되네요.

build.gradle 파일에 다음과 같이 선언되어 있는데, 스프링부트 3.0.1 버전에서는 17이 호환되는 거 같아서 질문드립니다. jdk 17깔고 설정하니 gradle install은 잘 되네요.
```
plugins { id 'org.springframework.boot' version '3.0.1' id 'io.spring.dependency-management' version '1.0.12.RELEASE' id 'java' }
```


java spring aws mysql spring-boot jpa

답변 1

1

최태현

안녕하세요 호정님! 질문 올려주셔서 감사합니다!! 🙂

혹시 "최종 완성 버전"을 다운로드 하신건 아닌가 싶습니다!!!

현재 압축 파일을 두 개 제공해 드리고 있는데요~

  • 처음 시작하기 위한 용도

    • spring 2.7.x 버전 + Java 11 버전

  • 최종 완성본 코드 비교 용도

    • spring 3.0.x 버전 + Java 17 버전

이렇게 두 가지 입니다!

만약 후자를 다운로드 받으셨다면, spring 3.0.x 버전의 최소 Java 버전이 17버전이기 때문에 JDK 17을 잘 설치 해주신게 맞습니다!!

답변이 도움이 되었다면 좋겠습니다~ 감사합니다!!! 🙏

1

박호정

아 두개가 제공되는 줄 몰랐네요. 최종본을 받아서 실행을 했습니다. 후자는 jdk 17로 돌아가는 것을 확인했는데요.

17버전으로 start.spring.io에서 받은 후에 에러 나는거 고쳐서 우선 세팅은 진행해서 하고 있었는데, 올려주신 다른 압축파일을 이용하도록 하겠습니다 답변감사합니다!

1

박호정



상황을 설명드리면, 강의 소개에서 ppt와 코드가 제공된다고 본 상태였어서 첫번째 강의 자료는 ppt, 두번째 강의자료는 코드인 것으로 생각을 했네요.

강의 제목이 각각 다음처럼 되어 있으면, 저와 같은 실수 하시는 분이 줄어들 거 같네요! 강의 잘 보고 있습니다~
-강의자료 (처음 시작하기 위한 코드)
-강의자료 (최종 완성본 코드)

1

최태현

안녕하세요 호정님!!! 오오오 정말 좋은 의견 감사합니다!

image미처 생각하지 못했던 부분이네요! 감사합니다 😊 빠르게 반영해두었습니다. 오늘도 좋은 하루 되세요!! 🙏

패키지 구분에 대해 궁금한게 있습니다

0

20

2

리액트 관련 질문이 있습니다.

0

64

2

스프링부트 버전

0

73

2

7강 강의를 들으려고 했는데 오류가 나서 서버가 안 켜지는거 같아요.

0

59

2

33강. UserLoanHistory의 관계성에 대한 질문

1

56

2

Java JDK 버전 문의의 건

0

132

2

ec2 에서 Linux버전이 달라져서 설치가 안되는것 같은데 자료 최신화좀 해주세요.

0

88

3

h2 console 접속했을 테이블 질문

1

65

1

ec2 서버에서 스프링 실행도 되고 인바운드 설정까지 했는데 index.html 안됨

0

75

2

15강. updateUser() 질문

0

55

2

깃허브 질

0

82

2

여기까지 다 끝냈다고 하셨는데

0

79

2

왜안될까요

0

70

2

MySQL 창이안ㄴ뜹니다

0

59

2

포스트맨

0

50

1

spring 개념적인 질문

0

71

2

인텔리제이 샘플코드 실행 안됨 오류

0

140

2

aws 배포할때 .env 파일에 저장한 환경변수에 관하여 여쭤볼게 있습니다

0

85

1

마이그레이션 오류입니다.

0

171

3

Whitelabel Error Page 오류가 났습니다.

0

163

2

안녕하십니까! 오류가 났습니다.. 도와주세요 ㅜㅜ

1

93

3

궁금한게 있습니다.

0

60

2

DTO 관련

0

70

2

궁금한게 있습니다!

0

68

2