关于java.lang.IllegalArgumentException: No destination bean specified异常问题:
No destination bean specified这个是目标的bean实体没有确定,异常代码如下:
CrmProcessOrdersParam crmProcessOrdersParam = null;
BeanUtils.copyProperties(crmProcessOrdersParam, crmProcessOrdersBean);
出现问题主要的原因是在复制对象过程中,如果有一方为null,则会抛出此异常!所以把目标实体实例化即可。
改正的代码:
CrmProcessOrdersParam crmProcessOrdersParam = new CrmProcessOrdersParam();
BeanUtils.copyProperties(crmProcessOrdersParam, crmProcessOrdersBean);