본문 바로가기

JAVA/Error

[Spring Boot] Intellij Error - No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.2 was found.

 

 

Intellij 에서 Project Build 시 해당 에러가 발생했다.

 

A problem occurred configuring root project 'demo'.
> Could not resolve all files for configuration ':classpath'.   
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.2.     
Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.2      
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.2 was found.

 

 

Spring boot 와 java 버전이 맞지않아 발생 한 에러.

Spring boot 3.x.x ver > java 17
Spring boot 2.x.x ver > java 11 이하

 

 

build.gradle 

 

id 'org.springframework.boot' version '2.7.6'

 

각자 사용하는 java version 에 맞게 수정해주면 된다.

 

 

 

build

 

server run

 

tomcat

 

build 가 성공적으로 되었고,

서버도 정상 작동 한다.