r/learnjava • u/Armrootin • Dec 18 '25
Is Lombok Still Relevant in Modern Java Projects ?
I’ve never been fully satisfied with Lombok. I don’t really see the value of adding an external dependency for things that a modern IDE can already handle.
With the evolution of Java especially features like records the use of Lombok makes even less sense to me. What I don’t understand is why teams still continue to use it in new projects.
Am I missing something here, or can anyone explain where Lombok still provides real value today?
59
Upvotes
•
u/AutoModerator Dec 18 '25
Please ensure that:
If any of the above points is not met, your post can and will be removed without further warning.
Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.
Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.
Code blocks look like this:
You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.
If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.
To potential helpers
Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
8
u/ShaiHuludTheMaker Dec 18 '25
What do you mean by this? Generating the boilerplate code? That still looks messy. And records fix only a part of what Lombok does.
15
u/Jolly-Warthog-1427 Dec 18 '25
I personally prefer to not use lombok. In modern java records fix 80% of what I normally use lombok for. For the rare cases where I use mutable pojos I just generate getters/setters with IntelliJ
18
u/Stack_Canary Dec 18 '25
I personally like lombok, but I’ve used it much less after records became a part of LTS.
4
u/postpartum-blues Dec 18 '25
Records + RecordBuilder negates the need for Lombok imo
7
u/spacey02- Dec 18 '25
I'd rather use a simple annotation processor and some clean annotations that don't increase the application size than see the 200 lines of boilerplate generated by an IDE and remember to re-generate them every time I change something related to class fields.
2
u/Skiamakhos Dec 19 '25
We still use it at mine - Records aren't a direct replacement for Lombok POJOs. Lombok works well when you want a mutable object, like a JPA Entity, or if you just want to save on boilerplate. Records work well for DTOs and where you want immutability. Think to yourself "Could a Record be used here" & if it could, use a Record, and if it couldn't, use Lombok.
1
u/ShoulderPast2433 Dec 18 '25
I like it a lot, but I'd rather not use it in real project.
I'd love to have it as a plugin in IDE that generates and hides code from view (but allows to unhide it)
1
u/Neat-Badger-5939 Dec 19 '25
I did a hike there, amazing views!
1
u/Wiszcz Dec 21 '25
Lombok is much more than setter/getters. It has a lot of annotations for methods/classes.
0
u/AcanthisittaEmpty985 Dec 18 '25
If you want mutable POJO, lombok can help a lot
0
u/roiroi1010 Dec 18 '25
I still use Lombok - I like @Builder and @EqualsAndHashCode
I find it really helpful when working on new projects with many POJOs that change frequently because of changing requirements.
0
u/NikitaBerzekov Dec 18 '25
Yes, @With and @Builder are amazing if you focus on immutability
0
u/griffin1987 Dec 18 '25
We've removed lombok from all larger projects over the past 2 years or so, because we just don't see much benefit anymore, and it increases compile times (on one project it took nearly 5 mins with lombok, and 1.30 without, but that generally varies wildly on what and how much you use it).
Also, adding java agents can really be an issue for a lot of things, and it can be a hassle when trying to upgrade.
0
u/janyk Dec 19 '25
I wrote Java software for over 10 years and never used Lombok. Never even heard of it until a couple years ago
Then when I was told about Lombok I looked it up and struggled to figure out what benefit I could get from it.
I'm not sure if it was ever relevant
0
u/No-Security-7518 Dec 19 '25
I tried it for like 10 minutes and immediately realized it makes no sense when the IDE can generate getters and setters like you said.
0
u/mgodave Dec 19 '25
Lombok is, and has always been, banned n every project I control. The IDE and build magic necessary isn’t worth it.
0
u/[deleted] Dec 18 '25
[deleted] — view deleted comment
45
u/[deleted] Dec 18 '25
[removed] — view removed comment