右鍵項目,【Maven】--》【Update Project Configuration...】默認成jdk1.5的解決辦法apache
<!-- pom.xml文件加入下面代碼 --> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build>