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
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
lombok is also added in dependencies
After googling, I got several solutions
Add in [File]-[Settings]-[Build, Execution, Deployment]-[Compiler]
Just save the app
I used this method to solve the problem myself.
Update lombok dependencies to
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