[Java代码] Java Bean 工具包 Dozer


Dozer是一个用来复制 JavaBean 属性的类库,类似 BeanUtils

例如:

http://www.lzfsk.com/fkjb/ydy/8080.html
http://www.lzfsk.com/fkjb/ydy/8081.html
http://www.lzfsk.com/fkjb/ydy/8082.html
http://www.lzfsk.com/fkjb/ydy/8084.html
http://www.lzfsk.com/fkjb/ydy/8085.html

  1. MapperIF mapper = new DozerBeanMapper();
  2. DestinationObject destObject = (DestinationObject) mapper.map(sourceObject, DestinationObject.class);
  3. //或者是
  4. DestinationObject destObject = new DestinationObject();
  5. mapper.map(sourceObject, destObject);

你可能感兴趣的:([Java代码] Java Bean 工具包 Dozer)