Intellij doesn't recognize Spring annotations and I think its connected to Lombok.
I added the plugin in IntelliJ settings and enabled annotation processing
I am using maven and I have this dependency
dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
Still Intellij can't recognize Slf4j and Spring annotations
Follow the steps
1. Build spring application as mentioned in: https://spring.io/guides/gs/spring-boot/
Build project
Enable annotation processing in IntelliJ(You have to do this every time you import new project, if you want it to be enabled by default then follow steps mention in this SO OP.
File
|Other Settings
|Default Settings
, navigate to the compiler settings, annotation processing and enable this option before importing the project.If you still face issue do once
File
/Invalidate caches
/Invalidate and restart
That's it.
Go to preferences in Intellij and install Lombok Plugin.Then it will work
You need to install the lombok plugin to intellij as well.