当前位置:网站首页>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
边栏推荐
- 测试/开发程序员靠技术渡过中年危机?提升自己本身的价值......
- 拼多多众多 API 接口皆可使用
- Linux redis source code installation
- 北京护照西班牙语翻译推荐
- 面试官:程序员,请你告诉我是谁把公司面试题泄露给你的?
- 【HCIP】MPLS 基础
- body中基本标签
- 一文搞懂ES6基本全部语法
- Behind the second round of okaleido tiger sales is the strategic support of ecological institutions
- Self-attention neural architecture search for semantic image segmentation
猜你喜欢
随机推荐
拼多多众多 API 接口皆可使用
Flink SQL Hudi 实战
Three ways of creating indexes in MySQL
IT硬件故障的主要原因和预防的最佳实践
log4j动态加载配置文件
vm options、program arguments、environment property
[leetcode sliding window problem]
【HCIP】重发布及路由策略的实验
过去10年的10起重大网络安全事件
了解网址url的组成后 运用url模块、querystring模块和mime模块完善静态网站
APP接入Kakaotalk三方登录
Rewriting method set
CSDN modify column name
【idea】查询字段使用位置
云原生应用综合练习上
新1688 API 接入说明
T-sne降维
全面升级,淘宝/天猫api接口大全
Redis is installed on Linux
Redis installation, cluster deployment and common tuning









