spring mvc HTTP Status 406 错误
错误信息:查看spring-mvc的配置文件:再次查看错误信息:description Theresourceidentifiedbythisrequestisonlycapableofgeneratingresponseswithcharacteristicsnotacceptableaccordingtotherequest"accept"headers().其字
错误信息:


查看spring-mvc的配置文件:

再次查看错误信息:
description The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers ().其字面意思:产生的格式跟能接受的格式不符。查询多种资料都说什么没有添加json支持的包。于是查看依赖:

存在的。
接着查找:
发现Spring默认ContentNegotia
原创不易,完成人机校验,阅读全文
相关推荐
工作小总结spring mvc 返回json报406错误工作小总结HTTP状态码->HTTP Status Code网络文章Spring IoC、AOP、Transaction、MVC 归纳小结GIT项目spring-mvc-mybatis 拿走即用的spring mvc整合mybatis(crud+分页插件)操作mysql的demo。经验分享使用idea创建spring mvc项目图文教程工作小总结spring mvc 接收页面表单List 怎么处理工作小总结记录一次Status Code:400 Bad Request解决方案及打印错误原因工作小总结spring mvc controller间跳转 重定向(forward) 传参 几种形式