Reputation: 51
I have gradle spring boot project and I added Lambok dependency in build.gradle. I created one model class and want to use lombok. I have added @Data annotation but still setter and getter methods are not generated. Sample code :
import lombok.Data;
@Data
public class TestLambok {
private int id;
private String name;
private String summary;
}
Upvotes: 3
Views: 11475
Reputation: 1418
Im using visual studio code. There is an extension called "Lombok Annotations Support for VS Code".
Installing this allowed the auto generated methods to show when querying the properties of the object
Upvotes: 0
Reputation: 235
Install the Lombok plugin first then you can use the @Data annotation. Please note that you won't physically see the getters, setters and toString() appear in your class aktjouy Lombok will create it
Upvotes: 1
Reputation: 483
For use Lombok Plugin, you need the following steps (at least on IntelliJ):
For more information you can read this post: https://www.baeldung.com/lombok-ide
Upvotes: 5