Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Lombok plugin to IntelliJ project [duplicate]

I'm trying to add Lombok to my Spring Boot project in IntelliJ IDEA. So far, I've

  1. added the plugin under Settings - Plugins (version 0.13.16)

  2. added compile('org.projectlombok:lombok') to my Gradle dependencies

  3. enabled annotation processing

It still doesn't recognize either the Lombok import or the annotations.

What am I missing?

Solved:

I had to run an update on my Gradle file.

like image 723
Anders Pedersen Avatar asked Dec 15 '16 09:12

Anders Pedersen


People also ask

How do I add Lombok jar to my project?

Adding the Lombok Plugin in IDE (Eclipse) Downloaded jar from https://projectlombok.org/download or use the jar which is downloaded from your maven build. Execute command in terminal: java -jar lombok. jar. This command will open window as show in the picture below, install and quit the installer and restart eclipse.

How do I import Lombok?

Go to File > Settings > Plugins. Click on Browse repositories... Search for Lombok Plugin. Click on Install plugin.

How do you use Lombok dependency?

1. Introduction to lombok. Lombok is used to reduce boilerplate code for model/data objects, e.g., it can generate getters and setters for those object automatically by using Lombok annotations. The easiest way is to use the @Data annotation.


1 Answers

You need to Enable Annotation Processing on IntelliJ IDEA

> Settings > Build, Execution, Deployment > Compiler > Annotation Processors

enter image description here

like image 172
A0__oN Avatar answered Oct 14 '22 15:10

A0__oN