I am generate the following project and its dependencies with Spring Boot 3 from Spring initializr
Opening and running project in Intellij IDEA the following output is returned
error: release version 17 not supported
Language level is invalid or missing in pom.xml. Current project JDK is 11. Specify language level in webflux-project
I have jdk 11 installed on my system
> java --version
java 11.0.14 2022-01-18 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.14+8-LTS-263)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.14+8-LTS-263, mixed mode)
pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.gamesmall</groupId>
<artifactId>webflux</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>webflux</name>
<description>Demo project for Spring Boot with WebFlux</description>
<properties>
<java.version>17</java.version>
</properties>
<dependencies>
...
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
how to resolved this issue?
According tothis article Spring Boot 3.0 will require Java 17 (jdk 17). So during project generation change Spring Boot version from 3.* to 2.7.* and solved !
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.