java "lambda expressions not supported at this language level"

在intellij idea 中使用jdk8新特性时报了"lambda expressions not supported at this language level"的问题,上网查询给出的答案如下

网上答案:

java "lambda expressions not supported at this language level"

修改product structure为如图所示,修改之后依然报错。

java "lambda expressions not supported at this language level"

java "lambda expressions not supported at this language level"

如果有修改以后依然不行的朋友可以参考以下修改方式,查询您的pom文件,看

maven-compiler-plugin插件的配置信息中是否配置了编译时jdk的版本,修改为1.8以上即可
如:
   
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.3</version>
  <!--use regular compiler for prod classes-->
  <configuration>
    <encoding>UTF-8</encoding>
    <source>1.8</source>
    <target>1.8</target>
  </configuration>
</plugin>