Solution to Cannot resolve symbol XXX under IntelliJ IDEA

After Idea imports the maven project, the operation can pass, but after opening some classes, an error message of Cannot resolve symbol XXX will appear.

Consider several possibilities:

1. JDK version, set the JDK version of JDK and Maven.

2. Whether to download dependencies or not, you can use install for maven projects without downloading.

3. file->invalidate caches to clear the cache.

The above methods have been used, and my problem has not been solved.

Later found

This is because when these symbols are defined in my project, the get and set methods are not written, that is, Idea uses the lombok plug-in when writing the project. And my Idea does not have this plugin.

So install the plugin

Settings→Plugins→Browse repositories Then enter lombok and install and restart.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325352303&siteId=291194637