解决办法:
方法一:在pom.xml里添加相关配置即可
<!--pom.xml-->
<build>
<plugins>
<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>
方法一:将 Target bytecode version 改为更高版本,将 Language level 也改为更高版本
在File->settings->Build,Execution,Deployment-->Compiler-->中可以查看更改Target bytecode version 版本
在File-->Project Structure中可以查看更改Language level 版本。
-------------------------------------------------------以下无正文--------------------
注:仅供学习,记录问题和参考,共勉!