原因:
Java版本错误
J2SE 8 = 52
J2SE 7 = 51
J2SE 6.0 = 50
J2SE 5.0 = 49
JDK 1.4 = 48
JDK 1.3 = 47
JDK 1.2 = 46
JDK 1.1 = 45
解决方法:
1. Maven Settings -> Maven -> Importing.
Set the JDK for importer to 1.8
Go to Maven Settings -> Maven -> Runner
Set the JRE to 1.8Go to File -> Project Structure -> SDKs
Make sure the JDK home path is set to 1.8