在maven项目中的pom.xml中添加以下节点,进行jre版本的配置,配置完后再进行项目更新后,并不会自动切换到jre1.5
添加在pom的url标签后面
<build>
< finalName >pay</ finalName > < plugins > < plugin > < groupId >org.apache.maven.plugins</ groupId > < artifactId >maven-compiler-plugin</ artifactId > < version >3.3</ version > < configuration > < source >1.8</ source > < target >1.8</ target > < encoding >UTF-8</ encoding > < testIncludes > < testInclude >none</ testInclude > </ testIncludes > </ configuration > </ plugin > < plugin > < groupId >org.apache.maven.plugins</ groupId > < artifactId >maven-compiler-plugin</ artifactId > < configuration > < source >1.8</ source > < target >1.8</ target > < encoding >UTF-8</ encoding > </ configuration > </ plugin > </ plugins > </ build >转载于:https://www.cnblogs.com/zst-blogs/p/11101175.html