Problem Description:
The default target bytecode version of idea creation project is 1.5
Manually change Project Settings => Modules ==>Language level to 8
Solution 1:
1) Manually change Project Settings => Modules ==>Language level to 8
2) Manually change the target bytecode version of Settings => Build, Execution, Deployment => Java Compiler to 1.8
)
3) After reimporting maven, the target bytecode version still changes to 1.5
Solution 2:
Add the following build in the pom file, but it still has no effect
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
Solution 3:
Found that the parent is missing in pom.xml, the default target bytecode version is 1.5