Background: In the project development, often encounter such problems, usually with the following three steps to solve. 1 Resolution ProcessOverview:When using MAVEN to build a Web project, you will often encounter this problem, the problem is clearly explained in error, that is, the Web module needs to use java1.7 and later versions, the current version does not meet. So you only need to modify the Java version to 1.7 and above.Workaround:1. There are three places in the Eclipse build web about Java that need to be modified for unification. (1) Modify in Java Build path Libraries (2) in Java Compiler (3) Modify 2 in Project facet. Most of the above modifications should be possible, but there is always an accident, or an error. Because the MAVEN build project is used, it is best to include the following code in the build tag in the Pom.xml file:
<build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid > <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> // If it is 1.8, change to 1.8 <target>1.7</target> // If it is 1.8, modify it to 1.8 </configuration> </plugin> </plugins></build>
3. Finally, right-click on MAVEN's update Project.
(go) Resolve dynamic Web Module 3.1 requires Java 1.7 or newer