In learning to follow the course of a project, saw the teacher with lombok very elegant, try to think, did not expect the bottom of the problem, repeatedly through access to information have not been solved, is not a whim version of the problem, then try even successful, for everyone to share.
1. Install lombok
- The first is the simplest kind of method, open idea, File-> Settings-> Plugins, search Lombok, click Install on the installation (need to restart the idea).
- networking is not a good idea at times, it is not present, you can go to the official website to download the idea, note download version, download, unzip the folder to the idea of plugins, I use 0.29-2019.3, wrong idea if there will be open prompt.
Links to the official: Lombok download
2. Turn annotation support
setting → Build,Execution,Deployment → Compiler → Annotation Processors中勾选上Enable annotation processing
3. The introduction of dependence (important!)
I was in the pit to live here, I see a lot of people write to introduce 1.16.xx online version, there is no written version, which can be used not in 2019.3.1 the idea, I do not know the specific reasons, here we have to cited job is 1.18.12.
Then you can successfully use!
The first blog, I do not know can not solve the problem, I hope you forgive me.