springmvc获取json Failed to load resource: the server responded with a status of 406 (Not Acceptable)
来源:互联网 发布:喜马拉雅电台 知乎 编辑:程序博客网 时间:2024/06/11 04:59
使用springmvc3.1版本时通过@ResponseBody标签返回JSON数据的方法都报406错: Failed to load resource: the server responded with a status of 406 (Not Acceptable) 经过调试发现少了jackson-core-asl和jackson-mapper-asl两jar包,导入了1.9版本的jar后,问题解决了。
在解决上面问题的时候,顺便在网上发现Spring 3.2版本的BUG:Spring 3.2.x通过@ResponseBody标签返回JSON数据的方法都报406错,该错误不是jar包没导入的问题,而是spring3.2的bug,因为spring 3.2的requestedMediaTypes为[text/html]的情况导致报406错误,而3.1的requestedMediaTypes为[*/*]
0 0
- springmvc获取json Failed to load resource: the server responded with a status of 406 (Not Acceptable)
- Failed to load resource: the server responded with a status of 406 (Not Acceptable)
- SprimgMVC:Failed to load resource: the server responded with a status of 406 (Not Acceptable)
- Failed to load resource: the server responded with a status of 406 (Not Acceptable)问题的解决方案
- (springmvc)页面找不到静态资源文件Failed to load resource: the server responded with a status of 404 (Not Found)
- Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
- jquery:Failed to load resource: the server responded with a status of 404 (Not Found)
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Spring MVC json报406错误的解决办法 Failed to load resource: the server responded with a status of 406
- the server responded with a status of 406 (Not Acceptable)
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- failed to load resource the server responded with a status of 500 (internal server error)
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- failed to load resource the server responded with a status of 500 (internal server error)
- SrpingMVC==>Failed to load resource: the server responded with a status of 404(Not Found)
- SharePoint Debug - Failed to load resource: the server responded with a status of 500
- Failed to load resource: the server responded with a status of 400 (Bad Request)
- [LeetCode][Java] Insert Interval
- HDU 2154 跳舞毯
- WebService大讲堂之Axis2(7):将Spring的装配JavaBean发布成WebService
- Qt之自定义菜单(按钮菜单)
- jsonKit第三方包错误解决方案
- springmvc获取json Failed to load resource: the server responded with a status of 406 (Not Acceptable)
- MQ7.5以后的权限问题解决
- UVA - 11627 Slalom
- HDU-2808
- zynq虐我千百遍——第2篇 Linaro之devicetree
- String类(传智播客java基础毕老师的源码)
- 使用kaptcha插件生成加法计算验证码
- 【Python 学习手册笔记】列表与字典
- 从layout到extent的演变史(二)