pinked

导航

Lombok

Lombok

Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.
Never write another getter or equals method again, with one annotation your class has a fully featured builder, Automate your logging variables, and much more.

使用步骤:

  1. 在IDEA中安装Lombok

  2. 在项目中导入Lombok的jar包

    <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.10</version>
    </dependency>
    
  3. 在实体类中注解

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    
  4. 更多使用

posted on 2020-01-10 15:44  pinked  阅读(115)  评论(0编辑  收藏  举报