BeanUtils.copyProperties(source, target)

1:BeanUtils.copyProperties(source, target);

2: @ApiField () annotation should be added to the attributes in the object to be copied

3 : Note that if source is null , an error will be reported

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

Guess you like

Origin blog.csdn.net/qq_39839828/article/details/108277734