Member-only story
Guide to Lombok With Spring Boot
Top 5 most frequently used Annotations and Hidden issues

Imagine you saw a bunch of boilerplate codes in a newly created app and you need to clean it up. If you are aware of Lombok, you will definitely try that out. But beware! You may not know what the consequences are of using that!
So today, I intend to bring you the most important and widely used annotations in Lombok with their limitations. This will give you a clear understanding of how to use Lombok in your project.
For those who are not familiar with project Lombok, I’ll introduce it very shortly.
What Is Lombok?
As per the official docs, “Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your Java.” It is basically an annotation processor that works at compile-time to add code into your classes.
Why Lombok?
The main advantage of Lombok is it minimizes/removes the boilerplate code and saves the precious time of developers during development. In the best cases, it can replace hundreds of lines of code to only five lines.
It increases the readability of the source code (clean coding) and saves space by reducing lines of code. Also, it can eliminate the misleading logging issues in your application.
How to install
Lombok supports all the major IDEs, such as IntelliJ, Eclipse, Netbeans, and even in VS code. Here I’m using IntelliJ as it is the most widely used IDE for Java. If you want to know how to set up a different IDE, read the official documentation here.
As of IntelliJ version 2020.3, you don’t need to configure the IDE to use Lombok anymore. But for the older version, you need to have the IntelliJ Lombok plugin.

You also need to enable annotation processing. In IntelliJ, go to File->Settings->Build, Execution, Deployment->Compiler->Annotation Processors. Select the Enable annotation processing checkbox.