How to enable lombok annotations in IDEA IDE

Lombok is a useful tool library for Java third-party libraries. Ideal for simplifying the writing of entity classes. A lot of get, set code, and constructors are omitted. However, in the IDEA Community version, Lombok recognition is not turned on by default, so it will always prompt an error when writing code in the IDE.

Turn on annotation processing options

In the IDEA menu, select File -> Settings, and then select in the Settings window that pops up

“Build, Execution, Deployment” -> Compiler -> “Annotation Processors”, then tick “Enable Annotation Processing” on the right, as shown in the following figure:

Enable Annotation Processing

Install Lombok Plugin

In the Settings window just now, select Plugins, enter Lombok in “Search plugins in marketplace” to find it, display Lombok and click “Install” to install. As shown in the figure:

Enable Annotation Processing

Once the installation is complete, follow the prompts to restart IDEA.

本文标题:How to enable lombok annotations in IDEA IDE

文章作者:Morning Star

发布时间:2022年01月25日 - 15:01

最后更新:2022年01月25日 - 15:01

原始链接:https://www.mls-tech.info/java/howto-enable-lombok-annotations-in-idea/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。