当前位置:网站首页>Lombook User Guide
Lombook User Guide
2022-07-29 01:32:00 【Blue code man】
1. What is? Lombook
Lombok It's a simple form of annotation that can help us simplify and eliminate some of the necessary but bloated ones Java Code tools , By using the corresponding annotation , You can generate the corresponding method when compiling the source code ,
That is, before simplifying us pojo, Entity classes are bloated get/set With or without parameters .
2.Lombok Use
Use Lombok The required development environment Java+Maven+IntelliJ IDEA perhaps Eclipse( install Lombok Plugin)
Idea Lower installation lombook plug-in unit

Now some idea The version will inherit automatically. If you inherit, you don't need to download .
maven rely on 、
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>Refresh your after import maven So you can use lombook It's amazing to find a developer .
3. Quickly create an entity class
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Activity {
private long id;
private long uerid;
}4 Explanation of notes
@Data : Annotation on class ; Providing all properties of the class getting and setting Method , It also provides equals、canEqual、hashCode、toString Method
@Setter: Comment on attribute ; Provide... For properties setting Method
@Getter: Comment on attribute ; Provide... For properties getting Method
@Log4j : Annotation on class ; Provide a... For the class Properties, log Of log4j Log object
@NoArgsConstructor: Annotation on class ; Provides a parameterless construction method for a class
@AllArgsConstructor: Annotation on class ; Provide a construction method of all parameters for the class
边栏推荐
- SQL question brushing: find the last of all employees who have been assigned departments_ Name and first_ Name and Dept_ no
- JS judge whether array / object array 1 contains array / object array 2
- Regular checksum time formatting
- els 到底停止
- Redis installation, cluster deployment and common tuning
- 【HCIP】重发布及路由策略的实验
- 拼多多众多 API 接口皆可使用
- [MySQL] string to int
- Learning summary of time complexity and space complexity
- ValueError: Colors must be aRGB hex values
猜你喜欢

mysql 创建索引的三种方式

PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益

Flink SQL Hudi actual combat

Docker-compose安装mysql

BOM系列之window对象
![[MySQL] historical cumulative de duplication of multiple indicators](/img/22/1d5162e2c9636c9455138f2f39d150.png)
[MySQL] historical cumulative de duplication of multiple indicators

18 diagrams, intuitive understanding of neural networks, manifolds and topologies

Docuware mobile labor solution can help you build a new productivity model: anytime, anywhere, any device

Intel introduces you to visual recognition -- openvino

梅克尔工作室——HarmonyOS实现列表待办
随机推荐
Letax record \documentclass{}, authoryear attribute is used
Django reports an error using pymsql module django.db.utils.operationalerror
Naver 三方登录
18 diagrams, intuitive understanding of neural networks, manifolds and topologies
一文读懂Okaleido Tiger近期动态,挖掘背后价值与潜力
[MySQL] string to int
【搜索】—— 迭代加深/双向DFS/IDA*
Regular checksum time formatting
BOM系列之定时器
JS judge whether array / object array 1 contains array / object array 2
云原生应用综合练习下
瑞吉外卖项目实战Day01
【HCIP】MPLS 基础
Docker compose install MySQL
PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
uniapp createSelectorQuery(). Select get returns null error
Flask project construction 2
过去10年的10起重大网络安全事件
20220728-不纯为数字的字符串排序
数据库的decimal类型的数据,发现可以通过resultSet.getDouble去拿到这个数据,但是通过getObject却拿不到这个属性。