BeanUtils.copyProperties忽略id
时间: 2023-10-19 14:33:51 浏览: 135
BeanUtils.copyProperties方法可以通过传入一个字符串数组来忽略指定的属性。在你提供的引用中,可以看到通过在数组中添加"id"来忽略id属性。因此,要忽略id属性,只需在调用BeanUtils.copyProperties方法时将"id"添加到要忽略的属性数组中即可。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [如何实现beanutils.copyproperties不复制某些字段?](https://blog.csdn.net/u011250186/article/details/127454488)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [BeanMapper:比BeanUtils.copyProperties更快](https://download.csdn.net/download/weixin_42131785/15331636)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文