Instead of annotating many classes with this annotation, i would like to set the ignoreproperties globally by default for atleast the properties with these names: @JsonIgnoreProperties({
"JavassistLazyInitializer",
"hibernateLazyInitializer",
"handler"})
Pointing me how this can be done will be greatly appreciated
.setIgnorals(JsonIgnoreProperties.Value.forIgnoredProperties("x", "y", "z"));
public JsonIgnoreProperties.Value findPropertyIgnorals(Annotated ac) {
if (ac instanceof AnnotatedClass) { // may also check it's for specific class(es)
return JsonIgnoreProperties.Value.forIgnoredProperties("x", "y", "z");
}
return JsonIgnoreProperties.Value.empty();
}