For example, in a project, prepare to use the java.util.objects#equals syntax, found that the hint version is not supported.
F4 View the configuration of module, it turns out to be version 1.6.
When I manually modified to 1.8, I was prompted: module is the Java version in Maven configuration.
So, to the Pom file, it is found that the default starter of spring boot is Java 1.6.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
</parent>
So I tried to add it in my own child pom:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<java.encoding>UTF-8</java.encoding>
</properties>
To overwrite the default starter configuration.
And then it's OK.
Idea, a workaround found when a Java syntax is not supported in a lower version