修改maven项目默认jre系统库1.5版本
eclipse创建maven项目JRE系统库版本是1.5的
如果想使用更高版本的 如1.8
做法如下:
1、寻找到maven路径下的conf文件夹,打开setting.xml
2、找到标签,在里面添加如下代码(注意要在注释符号外面添加)
<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>
3、保存好后再新建项目就欧克了
来源:CSDN
作者:WANG(ง •̀_•́)ง
链接:https://blog.csdn.net/WANGHONGP/article/details/104435305