@ResponseBody注解返回对象,请求接口时返回406,错误信息为The resource identified by this request is only capable of generating respon……

解决办法:

  • 检查相关pom依赖是否引入
<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-core</artifactId><version>2.5.0</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>2.5.0</version></dependency><dependency>  <groupId>com.fasterxml.jackson.core</groupId>  <artifactId>jackson-annotations</artifactId>  <version>2.5.0</version>  </dependency>
  • 检查Spring配置文件
<context:annotation-config />
<mvc:annotation-driven />
  • 后续补充 ……

@ResponseBody 406:The resource identified by this request is only capable of generating respon......相关推荐

  1. The resource identified by this request is only capable of generating respon

    The resource identified by this request is only capable of generating respon 参考https://blog.csdn.net ...

  2. The resource identified by this request is only capable of generating responses with characteristics

    [转]今天在调试springMVC的时候,在将一个对象返回为json串的时候,浏览器中出现异常: The resource identified by this request is only cap ...

  3. SpringMVC @ResponseBody 406

    使用@ResponseBody注解可以让Controller返回json格式的数据,在需要传输一个对象信息的时候往往使用这种方式.如果在使用的时候遇到了406,一般原因是: 缺少jar包.转换成jso ...

  4. springmvc整合fastjson

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  5. HTTP状态码及说明大全

    在通过浏览器访问某个网站时,网站的响应头数据中,都会包含一个响应的状态码,如下图所示: 这种表示请求处理的状态码,一般包含两个部分: HTTP 状态码(status code)和描述(reason-p ...

  6. Spring MVC控制器用@ResponseBody声明返回json数据报406的问题

    本打算今天早点下班,结果下午测试调试程序发现一个问题纠结到晚上才解决,现在写一篇博客来总结下. 是这样的,本人在Spring mvc控制层用到了@ResponseBody标注,以便返回的数据为json ...

  7. HTTP Status 406 -with characteristics not acceptable according to the request accept headers.

    贴上完整错误信息: The resource identified by this request is only capable of generating responses with chara ...

  8. Spring 3.2.* MVC通过Ajax获取JSON数据报406错误

    Spring 3.2.x通过@ResponseBody标签返回JSON数据的方法都报406错: Failed to load resource: the server responded with a ...

  9. postman 返回json乱码_POSTMAN发起请求收到乱码 http 406错误

    web前段异常: The resource identified by this request is only capable of generating responses with charac ...

最新文章

  1. VC++:如何将程序最小化到托盘
  2. 干 MySQL 两千万数据的大表优化解决过程,三种厉害的解决方案
  3. 单例模式(线程安全+延迟加载)
  4. mysql-workbench运行存储过程
  5. SpringBoot shedlock MongoDb锁配置
  6. 多线程 转账_多线程编程不可错过——彻底理解volatile
  7. 江淮大众正式更名,今日盘中涨停!
  8. Mock以及Mockito的使用
  9. 求完全二叉树结点个数(leetcode 222)
  10. python系统学习_【Python系统学习】基础篇
  11. java计数器_Java高效计数器
  12. 吗 极域软件可以装win10_关于win10企业版在极域电子教室软件 v4.0 2015 豪华版的全屏控制下如何取得自由...
  13. 调试STM32f401过程出现的问题
  14. 小爱音箱连接Windows蓝牙没有声音
  15. 盘点近年25家外卖O2O,谁比谁难过
  16. 数学7大定理比较,五点(驻、极、最、拐、间)比较,求极值问题(求根验证负数形式)
  17. 全网最详细charles抓包工具详细教程,实战教程(细致)
  18. 让div填满剩下的空间
  19. word对齐表格不在一行的文字
  20. VuePress 博客之 SEO 优化(一) sitemap 与搜索引擎收录

热门文章

  1. vmware-vmx.exe无法结束进程
  2. matplotlib 画双轴子图无法显示 x-轴 坐标轴标签
  3. NeuralProphet之七:NeuralProphet + Optuna
  4. python中pandas什么意思_python pandas 基础理解
  5. 看脸的世界:牙齿整齐找工作更容易
  6. C++实现OPT最佳页面替换算法,结果简明扼要
  7. java 弹幕 原理_Flutter 实现虎牙/斗鱼 弹幕效果
  8. Combined Margin loss人脸识别训练笔记
  9. Flex之AdvancedDataGrid用法
  10. 怎么用ai做出适量插画_用AI打造矢量人像插画