this post was submitted on 09 Apr 2025
8 points (75.0% liked)
Java
1639 readers
1 users here now
For discussing Java, the JVM, languages that run on the JVM, and other related technologies.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Anything that does under-the-cover low level magic is bad. The deeper the magic, the worse. Spring is the particular offender here with the lengths it goes so to make you not use
new
and never be able to debug why something happens. Or worse, why something doesn't happen. We know how to deal with code, but not magic.There's no magic in lombok, they're just meta annotations for class generation, no different than having each end every class implement some very specific interface exactly the same way every time. It's for reducing copy pasting. Debugging it is not a problem, especially that you can see the generated classes in the library files. Spring on the other hand is a black box, because it does too much and has become very bloated over the years, the goal of Spring is not to avoid using
new
the point is simplifying dependency injection and composition. The most fried part is the transaction management imo, because it's too delicate in the way it has to be configured.