Introduction to Lombok
Go Back to Course Outline Repositories https://github.com/terawarehouse/terawarehouse-catalog https://github.com/terawarehouse/teraw...
https://www.czetsuyatech.com/2019/06/spring-lombok-introduction.html
Repositories
- https://github.com/terawarehouse/terawarehouse-catalog
- https://github.com/terawarehouse/terawarehouse-react
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.
Post a Comment