About the idea of using lamb expression error: ambda expressions are not supported at this language level

I am using jdk1.8, using lamb expressions when an error

ambda expressions are not supported at this language level,

Later, we set up

Then restart the project, the use of the process is still being given access to information later, he said although the set, but the idea is still the default 1.5, the key is you need to add in the pom.xml file:

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</ properties> 

add more than two, restart, OK

Guess you like

Origin www.cnblogs.com/ylht/p/11032437.html