Reputation: 2264
I am new to lombok. I have defined the below model using lombok. However when I try to create a object of the model with parameters, it gives an error stating Paramterized connstructor is not defined
. From what I have read, @AllArgsConstructor
, @NoArgsConstructor
should create both a paramterized and default constructor.
I am able to access my parameters so I am sure lombok is setup correctly.
Am I missing something here?
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SomeObjectModel {
@JsonProperty("task")
State task;
@JsonProperty("time")
long time;
@JsonProperty("bool")
boolean bool;
}
Thanks
Upvotes: 0
Views: 5735
Reputation: 457
You need to install Lombok in your IDE (based on your post tags seems that you are using Eclipse)
Steps:
I hope it helps!!!
Upvotes: 1