BeanUtils

BusinessType persistent = businessTypeService.load(id);
                  //把businessType中的值覆盖persistent对应的值
                     //string[]中的字段不覆盖
		BeanUtils.copyProperties(businessType, persistent, new String[] {"id", "createDate", "modifyDate", "bizUser", "bizOrg"});
		businessTypeService.update(persistent);

你可能感兴趣的:(spring)