这两个类在不同的包下面,而这两个类的copyProperties()方法里面传递的参数赋值是相反的。
例如:
a,b为对象
BeanUtils.copyProperties(a, b);
public static void copyProperties(Object source, Object target) throws BeansException {//source 源文件,target 目标文件
copyProperties(source, target, (Class)null, (String[])null);
}
BeanUtils是org.apache.commons.beanutils.BeanUtils,b拷贝到a
public static void copyProperties(Object dest, Object orig) throws IllegalAccessException, InvocationTargetException {//destination,目标文件,original原始的,源文件
BeanUtilsBean.getInstance().copyProperties(dest, orig);
}
这两个不要搞混了