eclipse引入插件:
https://pan.baidu.com/s/1uiE7NqFOraQCO3JWut1ijQ 提取码:jqes
到路径下执行jar:
java -jar lombok.jar
按步骤一步一步安装完成。重新启动eclipse。
package java_demo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PersonLombok {
private String id ;
private String name;
private int age;
}
等价:
package java_demo;
public class PersonLombok {
private String id ;
private String name;
private int age;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(