I created a project from start.spring.io. No matter whether I choose Java 11 or Java 17 there, I get this error when I open this spring project in IntelliJ.
Error:
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.
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.
Note: I have installed Java 11 on my local machine.
Why importing Java/Gradle project is so much errorneous in IntelliJ?
>Solution :
Spring Boot 3 requires Java 17 as minimum version. So just install Java 17 and update java runtime path in IntelliJ.