object-object-mapping

Configuring ObjectMapper in Spring

非 Y 不嫁゛ 提交于 2019-11-26 00:25:25
问题 my goal is to configure the objectMapper in the way that it only serialises element which are annotated with @JsonProperty . In order to do so I followed this explanation which says how to configurate the objectmapper. I included the custom objectmapper as described here. However when the class NumbersOfNewEvents is serialized it still contains all attributes in the json. Does anybody have a hint? Thanks in advance Jackson 1.8.0 spring 3.0.5 CustomObjectMapper public class CompanyObjectMapper