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
You need to install Lombok in your IDE (based on your post tags seems that you are using Eclipse)
Steps:
I hope it helps!!!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.