Above your <dependencies>
section, add the following:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
And then right click on your project -> Maven -> Reimport . This will reconfigure the compiler for language level (instead of default 1.5 which is much too low), and more importantly import the libraries in your dependencies.
尝试右键单击项目1.配置->转换为Maven项目2.Maven --->更新Maven项目->强制更新快照和发行版
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.