@Data包括 get set吗
时间: 2023-11-15 13:51:58 浏览: 143
@Data注解包括了get和set方法。它为类提供了读写功能,从而不需要手动编写get和set方法。此外,@Data注解还会为类提供equals()、hashCode()和toString()方法。因此,使用@Data注解可以减少编写重复代码的工作量。\[1\]
#### 引用[.reference_title]
- *1* [@Data注解的使用](https://blog.csdn.net/renxt0508/article/details/89736579)[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^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [idea中注解“@Data”没有起set、get作用的解决方法](https://blog.csdn.net/ah_quwei/article/details/84971027)[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^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Lombok的@Date注解包含了哪些方法](https://blog.csdn.net/qq_47464056/article/details/126548552)[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^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文