Introduction to Lombok



Go Back to Course Outline

Repositories
[show category entity class]

Did you notice anything unusual?
And this [show the rest of the catalog entity classes]

Yes, you’re right, we didn’t create any getter or setter, we don’t have any equals or hashcode methods as well.

But take a look at this, expand the Eclipse Outline view.
[show the class outline]

Why do we have a no-arg constructor and getters and setters here?
[open businessEntity class] here as well. That is the power of Lombok. It’s a Java library that we can plug into our Spring tool suite editor. And it does a number of things like providing an automatic getter and seller methods. toString, no-arg constructor, and more.

For a full list of features go to https://projectlombok.org/features/all

How to install the plugin? Download the jar from Lombok, execute and select your IDE. Instruction can be found here: https://projectlombok.org/setup/eclipse.

I hope this plugin helps you as much as it did to me.

0 Comments

Post a Comment

Post a Comment (0)

Previous Post Next Post
NERV Open Source
Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.