spring使用jackson返回object报错:Handler execution resulted in exception: Could not find acceptable representation

问题:在springmvc中添加Jackson jar包返回Object类型,处理器方法的produces属性不写,默认根据类型,但如果指定了(错误原因)produces = "text/html;charset=utf-8"就会报错

错误码: Handler execution resulted in exception: Could not find acceptable representation

正确配置:

@RequestMapping(value = "/jacksonMap.do", produces = "application/json;charset=utf-8")

 

原文地址:https://www.cnblogs.com/cnsdhzzl/p/6081437.html