2019-08-20 17:09
正确的方式应该是在maven的settings.xml里面配置jdk的版本。而不是每次手动去改。你这样子改好了,maven update project 又会换回jdk1.5
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>