简体   繁体   中英

Java bean mapping library - which to choose (transforming one object to another)?

I have multi tier project with Model, DTO, Managers/Services using DTOs and also some CXF webservices clients with a layer that transforms responses to my models. We are using different approaches, the project is big, we use for example Spring Beautils an many by-hand mappings which can produce errors, are hard to maintain but are fastest.

I've found Orika an interesting library, that doesnt use reflection int the way the Dozer does, it generates code (like the by-hand code) in some point but I don't know when - when you build your application with maven or when the application is being deployed on for example Weblogic server? What would you chhose???

BTW: Do you know any other libraries that are worth using (I use Java 1.7, log4j, junit, spring, hibernate, cxf, jersey, guava, lamba4j)?

Here is thesis comparing various solutions to do mapping. Orika is a good choice.

You could be interested to see JMapper Framework . Especially as it permits to manage the multi-level mapping ( wiki page here)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM