[英]Language level is invalid or missing in pom.xml. Current project JDK is 11. Specify language level in project
I am generate the following project and its dependencies with Spring Boot 3 from Spring initializr我使用 Spring initializr 中的 Spring Boot 3 生成以下项目及其依赖项
Opening and running project in Intellij IDEA the following output is returned在Intellij IDEA中打开并运行项目返回如下output
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我的系统上安装了 jdk 11
> 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: 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).根据这篇文章Spring Boot 3.0 将需要 Java 17 (jdk 17)。 So during project generation change Spring Boot version from 3.* to 2.7.* and solved !
所以在项目生成期间将 Spring 引导版本从 3.* 更改为 2.7.* 并解决了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.