当前位置:网站首页>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
边栏推荐
- Third party login process of flask Weibo
- HCIA配置实例(eNSP)
- 【ManageEngine】局域网监控软件是什么,有什么作用
- vm options、program arguments、environment property
- PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
- Naver 三方登录
- 【HCIP】两个MGRE网络通过OSPF实现互联(eNSP)
- uniapp createSelectorQuery().select 获取返回null报错
- Flask generates image verification code
- Synchronized关键字详解
猜你喜欢

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

DVWA之SQL注入

【mysql】多指标历史累计去重问题

Recommended Spanish translation of Beijing passport

Redis installation, cluster deployment and common tuning

表达式求值

Openpyxl border

Ruiji takeout project actual battle day01

What are source code, inverse code and complement code

matplotlib中文问题
随机推荐
C language 300 lines of code to achieve mine sweeping (deployable + markable + changeable difficulty level)
拼多多众多 API 接口皆可使用
20220728 sorting strings that are not pure numbers
uniapp createSelectorQuery(). Select get returns null error
Google play APK uploads other international app stores
Flask project construction 2
DocuWare 移动劳动力解决方案可帮助您构建新的生产力模式:随时随地、任何设备
Openpyxl library fill color
File “manage.py“, line 14 ) from exc
[MySQL] historical cumulative de duplication of multiple indicators
北京护照西班牙语翻译推荐
【HCIP】重发布及路由策略的实验
全面升级,你能想象的都在这————京东API接口
PlatoFarm社区生态福音,用户可借助Elephant Swap获得溢价收益
Canal real-time parsing MySQL binlog data practice
Redis installation, cluster deployment and common tuning
log4j动态加载配置文件
跨模态对齐 20220728
Comprehensive upgrade, complete collection of Taobao / tmall API interfaces
redis安装,集群部署与常见调优