在IntelliJ IDEA中安装配置lombok
1、官网及说明
官网地址
主页说明:
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.
2、配置
在Settings-Plugins下搜索lombok,并install,安装完成之后会提示restart。
在restart之后会看到已安装的lombok插件。
安装之后还需要启用插件,在Settings-Build,Execution,Deployment-Compiler-Annotation Processors下勾选Enable annotation processing。
3、测试插件
插件实体类之后,在类上添加相关注解,如
@Data
@NoArgsConstructor
@AllArgsConstructor
可以在Structure中看到会自动生成setter/getter/constructor等方法。