当前位置:网站首页>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
边栏推荐
- body中基本标签
- 一文读懂Okaleido Tiger近期动态,挖掘背后价值与潜力
- Log4j dynamic loading configuration file
- 新1688 API 接入说明
- SDRAM Controller Design (two design methods of digital controller)
- SQL question brushing: find the employee number EMP with more than 15 salary records_ No and its corresponding recording times t
- Self-attention neural architecture search for semantic image segmentation
- Flink Postgres CDC
- Django reports an error using pymsql module django.db.utils.operationalerror
- RHCE command practice (I)
猜你喜欢
随机推荐
New 1688 API access instructions
RHCE command practice (II)
Moonbeam上的多链用例解析——Derek在Polkadot Decoded 2022的演讲文字回顾
Flask reports an error: pymysq1.err OperationalError:(1054, “Unknown column ‘None‘ in ‘field list‘“)
括号匹配的检验
New upgrade: get Taobao product details "advanced version" API
JS judge whether array / object array 1 contains array / object array 2
J9数字论:什么因素决定NFT的价值?
Bracket matching test
els 新的方块落下
Oozie工作调度
面试官:程序员,请你告诉我是谁把公司面试题泄露给你的?
[MySQL] string to int
Canal实时解析mysql binlog数据实战
梅克尔工作室——HarmonyOS实现列表待办
C language 300 lines of code to achieve mine sweeping (deployable + markable + changeable difficulty level)
了解网址url的组成后 运用url模块、querystring模块和mime模块完善静态网站
SQL question brushing: find the employee number EMP with more than 15 salary records_ No and its corresponding recording times t
Canal实时解析mysql binlog数据实战
Numpy 常见函数及使用








