Spring @JsonIgnore not working

前端 未结 8 1540
终归单人心
终归单人心 2020-12-01 07:46

How can I get @JsonIgnore to work I have a class. And even if I put the annotation there it has no effect on the output. I am using Jackson.

public class Que         


        
8条回答
  •  不思量自难忘°
    2020-12-01 08:31

    I faced the same issue while working with spring and hibernate. The reason for this was that in entity class I was using org.codehaus.jackson.JsonIgnore and in spring I was using com.fasterxml.jackson.jaxrs.JsonIgnore. Fix to any one library in both layers and problem will disappear.

提交回复
热议问题