Maven problems encountered in the use -Lambda expressions are not supported at language level '5'

Maven problems encountered in the use -Lambda expressions are not supported at language level '5'

Today encountered this problem in running maven project. So I follow the recommendations given system. Modify the language level.

Then not being given a lambda expression, happy about. Then run the code, the following error.

1563422049885

 

Later found a solution in the strength of Baidu. Click the file-settings and then the following screen appears after searching java compiler.

Plotted can see the red version number is not consistent with the java version of the changes, and then modify the run, perfect.

Reference blog: https://blog.csdn.net/qq291539326/article/details/79311373/

Guess you like

Origin www.cnblogs.com/liangbin-2019-03-30/p/11206400.html