idea每次运行项目时都提示源值1.5已过时,将在未来所有版本中删除的解决办法
1:在maven的setting中设置如下:
<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>
</profile>
2.在你的项目pom.xml文件内加上配置如下。
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
3.检查你的setting中编译版本是否设置为当前版本?
找到 Java compiler 设置成你的jdk版本
参考博客:
https://blog.youkuaiyun.com/wu_ri_san_xing/article/details/73013573
https://blog.youkuaiyun.com/hcwbr123/article/details/54693197
https://blog.youkuaiyun.com/mulinsen77/article/details/86165887