第一步:Settings中加入plugins --- lombok
第二步:maven中导入依赖
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
</dependency>
第三步:实体类中应用 pojo中
在实体类上增加@注解
package com.feijian.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
private int id;
private String name;
private String password;
}
标签:慎用,03,12,private,Mybatis,import,lombok
From: https://www.cnblogs.com/RUI2022/p/17208969.html