Quantcast
Channel: User Jonathan - Stack Overflow
Viewing all articles
Browse latest Browse all 40

Answer by Jonathan for BeanUtils.copyProperties() vs DozerBeanMapper.map()

$
0
0

You might check out my ModelMapper. It will intelligently map properties (fields/methods) even if the names are not exactly the same. Defining specific properties to be mapped or skipped is simple and uses real code instead of XML:

ModelMapper modelMapper = new ModelMapper();modelMapper.addMappings(new PropertyMap<Order, OrderDTO>() {  protected void configure() {    map().setBillingStreet(source.getBillingStreetAddress());    skip().setBillingCity(null);  }});

Check out the project homepage for more info:

http://modelmapper.org


Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>