Problem phenomenon: Use Intellij IDEA 2017.2 to create a new web project, use jdk1.8 version, the Target bytecode version should be set, and the Language level should be 1.8. However, every time a new module is added, all settings become the default 1.5. //So you need to modify the pom.xml file
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build>