解决方法 在pom.xml中添加如下代码,即可解决。 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</a