码迷,mamicode.com
首页 > 其他好文 > 详细

关于idea中使用lamb表达式报错:ambda expressions are not supported at this language level

时间:2019-06-16 18:43:40      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:code   title   关于   项目   src   res   重启   tar   pom   

我使用的是jdk1.8,使用lamb表达式的时候,报错

ambda expressions are not supported at this language level,

后来,设置了技术图片

接着重启了项目,在使用的过程中依然报错,后来查阅资料,说虽然设置了,但是idea默认还是1.5,关键的是需要在pom.xml文件中添加:

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

添加以上两段,重启,OK

关于idea中使用lamb表达式报错:ambda expressions are not supported at this language level

标签:code   title   关于   项目   src   res   重启   tar   pom   

原文地址:https://www.cnblogs.com/ylht/p/11032437.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!