解决办法:
pom文件添加下述代码
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>