IntelliJ IDEA 2020.3 EAP (Ultimate Edition) prompts that Lombok does not take effect

created at 03-28-2022 views: 2

Problem Description

When starting the project, after using the @slf4g annotation in the lombok plugin, the log shows that the variable cannot be found


This project can still be started normally before, but then it will show log as undefined variable after startup

We know that the log here is a variable automatically generated after using the @slf4g annotation after using the lombok plugin, so after encountering this problem, I first thought of two places

1.Is the lombok plugin installed?



Here we see that in Install (that is, the installed plugin), the lombok plugin has been installed and checked, indicating that this plugin is downloaded and installed and is in use.

So let's move on to another place where the problem might arise

2.Whether to introduce lombok dependency in pom.xml


pom.xml configuration

lombok is also added in dependencies

After googling, I got several solutions


1. -Djps.track.ap.dependencies=false

Add in [File]-[Settings]-[Build, Execution, Deployment]-[Compiler]


add configuration

Just save the app

I used this method to solve the problem myself.

2.Update the version that lombok depends on

Update lombok dependencies to 1.18.14+

update lombok dependencies

I didn't try this method. At that time, according to the pictures I found the problem myself, I found that my version was 1.18.6, which may indeed be the factor that the version is too low

Please log in to leave a comment.