在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等方法。