Expand my Community achievements bar.

Using Project Lombok in AEM Sling Models | AEM 6.5 | Java 11 | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

Using Project Lombok in AEM Sling Models | AEM 6.5 | Java 11 by AEM Queries & Solutions

Abstract

Most of the time in our projects we end up creating plain Sling models for dialogs value or for some performing some operations.
In some cases we just need a plain Sling Model where we just want to Inject some variables or create some variable and generate getters and setters for the same , also if you have around more than 20+ variables then you have to first declare those variables and then generate corresponding Getters and Setters which increases the size of your Java class by adding around 60+ extra line of code (if 20 variables).

In such scenarios we can make use of Project Lambok Library to get the Getters and Setters generated at runtime.

Add following maven dependency:



org.projectlombok
lombok
1.18.4
provided

Read Full Blog

Using Project Lombok in AEM Sling Models | AEM 6.5 | Java 11

Q&A

Please use this thread to ask the related questions.



Kautuk Sahni
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies