Why jackson is serializing transient member also?

前端 未结 4 1661
花落未央
花落未央 2021-02-01 13:53

I am serializing a POJO into JSON using Jackson 2.1.4 but I want to ignore a particular field from getting serialized. I used transient but still it is serializing that element.

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-01 14:32

    You can configure it with springs properties

    spring.jackson.mapper.propagate-transient-marker=true
    

提交回复
热议问题