我在IntelliJ中有一个简单的Maven Java项目。 我在项目中使用Java 8,并将语言级别设置为8。为什么maven reimport将语言级别设置回5? 如何避免呢?
我在IntelliJ中有一个简单的Maven Java项目。 我在项目中使用Java 8,并将语言级别设置为8。为什么maven reimport将语言级别设置回5? 如何避免呢?
在项目pom.xml中将Java版本显式设置为1.8,如下所示
<properties> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.source>1.8</maven.compiler.source> </properties>