通过BeanUtils.copyProperties可以时间拷贝对象中的值,下面的new String[]{"cid","agreeFlag","flag","publishTime","projectNum"}表示的不拷贝的属性值
CopyRight copyRight = copyRightService.createCopyRight(request, user);
//获得要修改的course,然后重新设置参数
CopyRight copyRightInDataBase = copyRightService.findByCopyRightId(copyRight.getCid());
BeanUtils.copyProperties(copyRight, copyRightInDataBase,
new String[]{"cid","agreeFlag","flag","publishTime","projectNum"})
时间: 2024-10-03 14:44:41