当前位置:网站首页>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
边栏推荐
- File “manage.py“, line 14 ) from exc
- Code generator
- numpy.where() 用法和np.argsort()的用法
- els 方块移动
- Log4j dynamic loading configuration file
- Teach you a text to solve the problem of JS digital accuracy loss
- 【HCIP】MPLS 基础
- JS judge whether array / object array 1 contains array / object array 2
- Canal实时解析mysql binlog数据实战
- 括号匹配的检验
猜你喜欢

HCIA配置实例(eNSP)

【Unity项目实践】合成大西瓜

SQL question brushing: find the employee number EMP with more than 15 salary records_ No and its corresponding recording times t

Openpyxl border

DocuWare 移动劳动力解决方案可帮助您构建新的生产力模式:随时随地、任何设备

Behind the second round of okaleido tiger sales is the strategic support of ecological institutions

【搜索】—— DFS之剪枝与优化

Bracket matching test

Flask project architecture (First Edition

SQL question brushing: find the last of all employees who have been assigned departments_ Name and first_ Name and Dept_ no
随机推荐
嵌入式分享合集23
北京护照西班牙语翻译推荐
Flask project architecture (First Edition
J9 number theory: what factors determine the value of NFT?
BOM系列之定时器
【idea】查询字段使用位置
Expression evaluation
时间复杂度、空间复杂度的学习总结
Django reports an error using pymsql module django.db.utils.operationalerror
Pinduoduo can use many API interfaces
[MySQL] historical cumulative de duplication of multiple indicators
如何选择专业、安全、高性能的远程控制软件
RHCE command practice (II)
全新升级:获得淘宝商品详情“高级版” API
Code generator
Synchronized关键字详解
括号匹配的检验
Flink Postgres CDC
全面升级,你能想象的都在这————京东API接口
Third party login process of flask Weibo