错误web
类名:org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver||行数:152||异常信息:Content type 'application/octet-stream' not supported
spring
源码json
@RequestMapping("/")
@ResponseBody
public JSONObject GHCallBack(@RequestBody JSONObject body) {
return icbcCallBackService.GHCallBackHandler(body);
}mvc
解决方法:app
@RequestMapping("/")
@ResponseBody
public JSONObject GHCallBack(@RequestBody String body) {
return icbcCallBackService.GHCallBackHandler(body);
}源码
总结:servlet
application/octet-stream 是原始的二进制流方式,采用application/json + Bean接受的方式出现转换异常,应该使用原始的String接收方式。io