5 Java Libraries You Should Know
Vložit
- čas přidán 12. 02. 2024
- #sivalabs #java #opensource #architecture #productivity #softwaredevelopment
In this video, I will share some of the Java libraries I think every Java developer should know about.
Sample Repository: github.com/sivaprasadreddy/mu...
🚀 🎬 Java Testing Made Easy Playlist • Java Testing Made Easy...
🚀 🎬 Spring Boot - The Missing Guide Series Playlist • Spring Boot - The Miss...
🚀 🎬 Spring Boot Tips Series Playlist • Spring Boot Tips
🚀 🎬 Spring Boot + Kubernetes Tutorial Series Playlist • Spring Boot + Kubernet...
Blog: www.sivalabs.in
Twitter: / sivalabs
Code Repository: github.com/sivaprasadreddy - Věda a technologie
Thank you for sharing these helpful libraries.
RecordBuilder seems interesting library.
Lombok library provides record builder functionality. It is way more used in the industry in enterprise level.
Yes, Lombok is a widely used library and I too have used it extensively (www.sivalabs.in/should-you-use-lombok-or-is-it-bad-for-you/). I never had any trouble while using Lombok alone, but when used it with other annotation processors like MapStruct, AutoValue then there are some issues.
Regarding MapStuct, does it support expression/ conditional kind of conversion?
Like suppose, I have a wrapper class Boolean in Entity. But I want to pass primitive boolean to DTO. Expression will be
flag == null ? false : true
flag is wrapper Boolean class in Entity.
Yes, it checks for null and assign the correct value as follows:
boolean active = false;
if ( user.active() != null ) {
active = user.active();
}
UserDTO userDTO = new UserDTO( id, fullName, emailAddress, active );