BeanUtils.copyProperties使用不同的包,参数位置不同

举例:a,b为对象
BeanUtils.copyProperties(a, b)
1、BeanUtils是org.springframework.beans.BeanUtils时,a拷贝到b
2、BeanUtils是org.apache.commons.beanutils.BeanUtils时,b拷贝到a
注:源码
1、springframework

2、apache

 

 

posted @ 2021-06-25 18:13  一隅桥畔  阅读(150)  评论(0)    收藏  举报