import org.springframework.beans.BeanUtils;
BeanUtils.copyProperties(a, b); // 将a的值赋值到b,自动识别相同的属性进行赋值
异常:
java.lang.IllegalArgumentException: null // 非法参数异常、
1.在a赋值到b时,对象属性的类型不一致。Integer >> int, int不能存储null
2.其它同理
import org.springframework.beans.BeanUtils;
BeanUtils.copyProperties(a, b); // 将a的值赋值到b,自动识别相同的属性进行赋值
异常:
java.lang.IllegalArgumentException: null // 非法参数异常、
1.在a赋值到b时,对象属性的类型不一致。Integer >> int, int不能存储null
2.其它同理