在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插件。
Lombok的安装配置
安装之后还需要启用插件,在Settings-Build,Execution,Deployment-Compiler-Annotation Processors下勾选Enable annotation processing。

3、测试插件
插件实体类之后,在类上添加相关注解,如
@Data
@NoArgsConstructor
@AllArgsConstructor
可以在Structure中看到会自动生成setter/getter/constructor等方法。

相关文章:

  • 2021-11-14
  • 2022-12-23
  • 2021-06-14
  • 2021-06-20
  • 2021-11-23
  • 2022-01-06
  • 2021-08-08
猜你喜欢
  • 2022-01-03
  • 2021-11-16
  • 2022-12-23
  • 2021-10-02
  • 2022-12-23
  • 2021-09-16
  • 2021-09-02
相关资源
相似解决方案