I am trying to return only those properties that have values, but nulls are also returned.
I know there is an annotation that does this ( @JsonInclude(Include.NON_NULL) ), but then I need it in every entity class.
So my question is: is there a way to configure globally through spring configuration? (preferably avoid XML)
EDIT: This question seems to be considered a duplicate, but I don't think so. The real question here is how to configure it with spring config, which I could not find in other questions.
java json spring jackson spring-mvc
Pedro silva
source share