admin管理员组

文章数量:1635985

Beanutils.copyProperties 异常一: No origin bean specified
Beanutils.copyProperties 异常二: No destination bean specified
Beanutils.copyProperties的源码:

public void copyProperties(Object dest, Object orig) throws IllegalAccessException, 
    InvocationTargetException, NoSuchMethodException {
    if (dest == null) {
        throw new IllegalArgumentException("No destination bean specified");
    }
    if (orig == null) {
        throw new IllegalArgumentException("No origin bean specified");
    }
    ......
}

通过源码我们可以了解到public void copyProperties(Object dest, Object orig)方法的两个参数值为NULL就会报出上面两个错误。

本文标签: BeanUtilsJavabeandestination