wuyishu67
wuyishu67
wuyishu67
Joined 2 years ago
DecJanFebMarAprMayJuneJulyAugSeptOctNov
wuyishu67
·

spring boot 自带一个 BeanUtils 类,可以用来批量复制字段值,BeanUtils,用法:

BeanUtils.copyProperties(user, userDTO);

还有拓展方法,第三个参数 ignoreProperties,设置忽略的字段,具体你 ctrl 点击查下文档