In my project, lombok is used to avoid writing getters and setters for a class.
I have two classes Child extends Parent:
@Value
@Builder
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class Parent {
@Nonnull
@JsonProperty("personId")
private final String personId;
@JsonProperty("personTag")
private final String personTag;
...
}
And
@Value
@Builder
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class Child extends Parent {
@Nonnull
@JsonProperty("childId")
private final String childId;
...
}
But this doesn't seems work as no default constructor available in Parent. I'm not familiar with the lombok annotation. Is there any good way to extend the Base class and use the lombok annotation at the same time?