解决方法:在pom.xml文件中设置jdk版本 参考自独行侠_阿涛 的博客
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins
</groupId>
<artifactId>maven-compiler-plugin
</artifactId>
<version>2.5.1
</version>
<configuration>
<showDeprecation>true
</showDeprecation>
<showWarnings>true
</showWarnings>
<source>1.8
</source>
<target>1.8
</target>
<encoding>UTF-8
</encoding>
</configuration>
</plugin>
</plugins>
</build>
转载请注明原文地址:https://ipadbbs.8miu.com/read-8719.html