How to return JSON data from spring Controller using @ResponseBody

后端 未结 8 1114
情深已故
情深已故 2020-11-27 04:55

Spring version 4.2.0, Hibernate 4.1.4 Here is my Controller function:

@RequestMapping(value = \"/mobile/getcomp\", method = Req         


        
8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 05:24

    In my case I was using jackson-databind-2.8.8.jar that is not compatible with JDK 1.6 I need to use so Spring wasn't loading this converter. I downgraded the version and it works now.

提交回复
热议问题