1 安装
File->Settings->Plugins->搜索lombok->install->重启IDEA
2 配置
IDEA开启 Enable annotation processing
File->Settings->Build,Execution,Deployment->Compiler->Annotation Processors->勾选Enable annotation processing
Gradle or Maven配置
见官方Github中Lombok project dependency部分
3 使用
@Data就会自动生成set/get方法
import lombok.Data;
@Data
public class AnimalClassificationRequest extends BaseRequest{
public String url;
private String modelVersion;
}
网友评论