Anoop M Nair
Anoop M Nair

Reputation: 1087

lombok @Data not generating getters and setters

I am using @Data annotation on my entity class.

 @Data public class Test {
    private String name;
    private String lName;

I am using the latest lombok dependency

 <dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.4</version>
    <scope>provided</scope>
</dependency>

The class file after maven compile/package look like this

 package ******.models;

        public class Test {
            private String name;
            private String lName;

            public Test() {
            }

Any idea on this error?Using IntelliJ IDEA as my IDE where lombok plugin is active

Upvotes: 1

Views: 1963

Answers (1)

Yogesh Badke
Yogesh Badke

Reputation: 4597

Most likely your annotation processing in IntelliJ is off. You can turn it on by referring to the following image

enter image description here

Upvotes: 1

Related Questions