Idea solves the error: lambda expressions are not supported in -source 1.7

1. Prospect

Today I plan to integrate springboot into the websrvice interface, but I encountered a problem during the integration process, that is, as the title says-source 1.7 does not support lambda expressions, and I also specifically record the solution process

2. Problems encountered

3. Cause of the problem:

I added the scan plug-in, and as a result, the source and target were written as 1.7, which caused the ide to show that 1.7 does not support Lambda, indicating that it does not support

4. Solution:

We can change the source and target1.7 to 1.8, and the problem is solved in this way

5. Other reasons:

It is also possible that the configuration in the maven configuration file settings.xml file leads to the need to check whether the above version is wrong in the profiles tag, as shown in the figure below

6. Solutions for other reasons

If there are problems mentioned above, we only need to change the version to 1.8.

for reference only!

Guess you like

Origin blog.csdn.net/weixin_44719880/article/details/129392257