我是靠谱客的博主 不安衬衫,这篇文章主要介绍注解@Data JavaBean省去get set 方法,现在分享给大家,希望可以做个参考。

复制代码
1
2
3
4
5
6
Maven 引入 <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.16.22</version> </dependency>

 

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import lombok.Data; import java.io.Serializable; @Data public class CustomerInfoModel implements Serializable { private Long customerSubId; //客户表ID(集团客户存在多个子客户) private Long customerId; private String customerSubName; private String uniqId; //状态 0 无效 1 有效 private Integer state; //手机号 private String customerMobile; private String customerName; //客户类型 1.个人客户 2.集团客户 private Integer customerType; //主账户 private Long mainAccountId; //虚拟账户 private Long virtualAccountId; public CustomerInfoModel(Long customerSubId, Long customerId, String customerSubName, String uniqId, Integer state, String customerMobile, String customerName, Integer customerType, Long mainAccountId, Long virtualAccountId) { this.customerSubId = customerSubId; this.customerId = customerId; this.customerSubName = customerSubName; this.uniqId = uniqId; this.state = state; this.customerMobile = customerMobile; this.customerName = customerName; this.customerType = customerType; this.mainAccountId = mainAccountId; this.virtualAccountId = virtualAccountId; } public CustomerInfoModel() { }

最后

以上就是不安衬衫最近收集整理的关于注解@Data JavaBean省去get set 方法的全部内容,更多相关注解@Data内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(72)

评论列表共有 0 条评论

立即
投稿
返回
顶部