A problem occurred configuring root project 'practice'.
> 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.6' but:
위와 같이 프로젝트 생성 시 build가 되지 않는 문제 발생!
java version을 spring boot version에 맞게 바꿔주면 된다!
spring boot ver. | java ver. |
---|---|
3.X (ex: 3.0.1 ) | 17~ |
2.X (ex: 2.0.1 ) | 11 |
본인은 인텔리 제이를 사용했으므로 과정을 나타내면,
file - setting - Build, Execution, Deployment - Build Tools - Gradle 에서 Gradle projects의 Gradle JVM을 17 이상으로 해주면 된다. (Spring-goot-gradle-plugin:3.0.1
인 경우)
Apply - OK를 누른 뒤 변함이 없다면, build.gradle
에서 build 버튼을 눌러주면 된다!