1,pom添加lombok
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<!-- <scope>provided</scope> -->
</dependency>
2,eclipse安装lombok
找到lombok在本地仓库的位置,双击jar进行安装
3,具体使用
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LombokDemo {
String name;
Integer age;
}