Spring MVC and Jackson mapping do not return the root element in json

后端 未结 4 1915
夕颜
夕颜 2021-01-06 12:09

I am having one issue with Spring MVC and its json support. I make one ajax call to get some data and I want to get that data in json format including the root value. I am

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-06 12:23

    Alternative to this use following one statement:

    setAnnotationIntrospector(introspector);
    

    instead following two statements,

    super.getDeserializationConfig().setAnnotationIntrospector(introspector);
    super.getSerializationConfig().setAnnotationIntrospector(introspector);
    

提交回复
热议问题