1:Apache的拷贝
commons-beanutils
commons-beanutils
1.9.2
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.beanutils.PropertyUtils;
PropertyUtils.copyProperties(source, target);
BeanUtils.copyProperties(source, target);
2:spring的拷贝(效率高)
org.springframework
spring-beans
4.3.2.RELEASE
import org.springframework.beans.BeanUtils;
BeanUtils.copyProperties(source, target);