使用BeanUtils复制Java对象

 1.BeanUtils位于org.apache.commons.beanutils.BeanUtils

完整方法:

BeanUtils.populate( Object bean, Map properties ),

这个方法会遍历map<key, value>中的key,如果bean中有这个属性,就把这个key对应的value值赋给bean的属性。

原文链接:https://blog.csdn.net/dwyers/article/details/38797127

2.BeanUtils位于org.springframework.beans.BeanUtils

猜你喜欢

转载自www.cnblogs.com/lvhouhou/p/12921998.html
今日推荐