Jackson Not Overriding Getter with @JsonProperty

前端 未结 10 2085
醉话见心
醉话见心 2021-02-12 06:23

JsonProperty isn\'t overriding the default name jackson gets from the getter. If I serialize the class below with ObjectMapper and jackson I get

<
10条回答
  •  梦谈多话
    2021-02-12 06:29

    I had same proplem

    You need just to replace import import com.fasterxml.jackson.annotation.JsonProperty; on import org.codehaus.jackson.annotate.JsonProperty; Its work.

提交回复
热议问题