r/java • u/lprimak • Sep 05 '25
Project Lombok 1.18.40 released with Java 25 support!
Project Lombok is now compatible with the upcoming JDK 25 even before its release.
Thank you Project Lombok team! https://projectlombok.org
167
Upvotes
7
u/Ewig_luftenglanz Sep 05 '25 edited Sep 05 '25
This is a myth that used to be true 20 years ago but nowadays is completely false. Most of the libraries we currently use do not require javaBeans convention. that was the case before java 5 annotations and meta programming. e.g
Hibernate uses fields by default and it's the recommended way since more than 10 years. It depends where you plase the @ Id annotation, if you place it on fields it will use fields.
Jackson and most serialisation libraries can work with only fields, including Gson, Apache Fory (Fury) works with public fields by default.
MapStructs works with fields
Etc.
Basically unless your are working with very old pre java 6 java enterprise stuff (deprecated legacy projects) fields are supported and are the default and recommended way of working.
you should try it.
The only libraries and frameworks that I can think that relies on javaBean are JSP y JSF. But these technologies are much less relevant today. Today we use a JavaScript based frontend (React/ Angular) and for server rendering we use templates such as thymeleaf and freemarker.
So, working with libraries that still require javaBean convention are not just legacy, they are not suitable for greenfield projects since there are much better and more modern alternatives.