@Data@AllArgsConstructor@NoArgsConstructor@Builder
时间: 2023-10-03 22:02:36 浏览: 174
回答: @Data注解生成了类的Getter、Setter、equals、canEqual、hashCode、toString等方法;@AllArgsConstructor注解生成了类的全参数构造函数;@NoArgsConstructor注解生成了类的无参构造函数;@Builder注解可以用于生成建造者模式的代码,用于创建对象。这些注解可以通过Lombok库在Java代码中使用,简化了类的代码编写过程。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* [Lombok 中 @Data、@AllArgsConstructor、@NoArgsConstructor、@Builder 注解的含义与使用](https://blog.csdn.net/tonglingtou1875/article/details/112918578)[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^v92^chatsearchT3_1"}} ] [.reference_item]
- *2* [Lombok的使用,简化代码(springboot小技巧)](https://blog.csdn.net/guoqi_666/article/details/107865784)[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^v92^chatsearchT3_1"}} ] [.reference_item]
- *3* [lombok几个基本注解的使用@Data@AllArgsConstructor@NoArgsConstructor@Builder](https://blog.csdn.net/qq_43525747/article/details/120676088)[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^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文