BeanUtils.copyProperties(source, target)

1:BeanUtils.copyProperties(source, target);

2:待拷贝的对象中的属性要添加@ApiField()注解

3:注意,如果sourcenull,则会报错

Exception in thread "main" java.lang.IllegalArgumentException: Source must not be null

猜你喜欢

转载自blog.csdn.net/qq_39839828/article/details/108277734
今日推荐