最近看了lombok的一些简单应用,简单易上手,
package com.zh.pojo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; /** * @ClassName UserInfo * @Description TODO * @Author zh * @Data 2020/12/30 13:46 **/ @Data @NoArgsConstructor @AllArgsConstructor public class UserInfo { private Integer userId; private String username; private String password; private String realName; private String sex; private Integer age; private String phone; private String verifyCode; }
Lombok 提供了一系列的注解帮助我们简化代码,比如:
可以去看看更详细的博客文档
https://www.cnblogs.com/death00/p/11722152.html