top of page

How to configure Lombok in eclipse


 

What is Lombok?

Lombok is a tool and it used to reduce boilerplate code for model/data objects, e.g., it can generate getters and setters for those object automatically by using Lombok annotations

All the required method which we need in our any model/Entity class that we can get using Lombok annotation so we no need to write it manually

Let’s have a look on few Lombok provided annotation and its purpose

To work with Lombok Project we need to add Lombok dependency

Maven:

Gradle:

Once we will add this dependency then we are enable Lombok project, and all annotation we can write in your application .but it’s not enough to enable Lombok project in our eclipse

So for that we need to configure Lombok in our eclipse IDE

Follow below steps:

1.Go to m2 repository , where Lombok jar stored

2.Then go to command prompt and specify path to this directory and then run this Lombok jar with command

Run command

3.After run above command one popup will open like below

4.Then click on specify location and then give your eclipse.exe installed path like below

Then click install and update then it will add plugin to your eclipse IDE so that we can now use all Lombok provided annotation and its features

Let’s create one dummy model and add few of Lombok annotation

So if you mark above dto we manually no need to write setter, getter, toString and constructor manually

These features we can achieve using annotation.


bottom of page