Cannot resolve method appears under Maven project under Intellij Idea

The “cannot resolve method” appears under the Maven project under Intellij Idea... The
reason is because Idea lacks the Lombok plug-in

Introduction to lombok

Lombok can greatly simplify and eliminate the code we write, and use annotations to omit get set toString... and other methods to make the code look more beautiful. Lombok generates the corresponding method at compile time, which is the same as the get set method we wrote, and it comes with these tags.

lombok installation

1. Introduce lombok dependency in maven pom

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.16.8</version>
    <scope>provided</scope>
</dependency>

2. File—setting—plugin—search for lombok—install and restart under IDEA

Guess you like

Origin blog.csdn.net/chaokudeztt/article/details/110275705