The resource identified by this request is only capable of generating respon
参考https://blog.csdn.net/qq_38404440/article/details/80570915
配置文件增加:

<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><property name="messageConverters"><list><ref bean="mappingJacksonHttpMessageConverter" /></list></property></bean><bean id="mappingJacksonHttpMessageConverter"class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"><property name="supportedMediaTypes"><list><value>application/json;charset=UTF-8</value></list></property></bean>

随后报错

cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the type's content t

参考原文链接:https://blog.csdn.net/mafan121/article/details/43266733
错误原因:Spring在初始化的时候无法识别applicationContext.xml中的元素。
可能产生该错误的原因:网上复制的代码直接粘贴到了xml文件中,而网上的代码可能不符合xml规范

解决办法:1.去掉xml文件中的中文注解,因为复制的有些注解Spring不能识别。

              2.若仍然有错,则尝试修改多余的空格,因为中文空格Spring有可能识别错误。3.最后的绝招:重新手动抄写一遍文件内容,保存。
 Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0' defined in class path resource [applicationContext_consumer.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException

NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException
原因缺少jar包
第一次导入2.7.0版本的,反复格式化不成;
第二次导入2.1.0版本的,格式化后,关闭eclipse后重启,项目可以正常运行了,这一路的坎坷。

The resource identified by this request is only capable of generating respon相关推荐

  1. @ResponseBody 406:The resource identified by this request is only capable of generating respon......

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

  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. 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 ...

  4. spring MVC之返回JSON数据(Spring3.0 MVC+Jackson+AJAX)

    参考: http://angelbill3.iteye.com/blog/1985075 问题:在进行springmvc返回json数据的时候报如下错误:用上面的controller,访问:http: ...

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

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

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

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

  7. JAVA开发血泪之路:一步步搭建spring框架

    JAVA开发血泪之路:一步步搭建spring框架 作为一个服务端开发感觉一直挺排斥框架这种东西的,总觉得什么实现逻辑都帮你封装在里面了,你只需要配置这配置那个,出了问题也不知道怎么排查,之前即使写we ...

  8. springmvc整合fastjson

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

  9. 常见的HTTP网络状态码汇总+HttpServletResponse源码

    常见HTTP网络状态码类型为1-5开头 1XX 表示消息 2XX 表示成功 3XX 表示重定向 4XX 表示客户端请求错误 5XX 表示服务端响应错误 常见HTTP网络状态码 200 OK:表示请求成 ...

最新文章

  1. CS131专题-8:图像纹理
  2. android 流式编程,流式编程
  3. 《基于压缩传感的匹配追踪重建算法研究》读书笔记
  4. 阿里洛神云网络这局妥了!集齐“软硬结合、创新NFV、智能管理”三张牌
  5. 前端开发中通过js设置cookie的一组方法
  6. css结构和重叠之选择器的特殊性
  7. 索尼 android l,家庭影院级音质 索尼Xperia i1参数全曝光
  8. java sql in无效数字_java.sql.SQLSyntaxErrorException: ORA-01722: 无效数字
  9. c#获取部分DRAW
  10. 有助于改变你命运的5个处世潜规则
  11. JavaScript编程语言概述
  12. 吾爱破解安卓逆向入门教程
  13. 使用 Wowza 录制直播流 (HTTPLiveStreamRecord)
  14. 【过关斩将】选择那些能产生复利效应的事情精进自己
  15. prisma orm_使用Prisma和React构建RECIPE应用
  16. 【Java学习002】Java-ArrayList源码解析
  17. 乐视账号服务器关闭,乐视手机重置后无法登录账号 官方给出解决方案
  18. Activiti7工作流介绍及使用
  19. 云服务器线上MySQL的安全保护措施
  20. matlab 反复激活 许可证到期 解决方法

热门文章

  1. device unauthorized adbd cannot run as root in production builds insufficient permissions
  2. Logic Pro X for Mac(音乐制作软件)
  3. 【IDEA】单独运行一个类的方法
  4. 详解 GloVe 的原理和应用
  5. KDD 2021 | 基于多智能体协同竞价博弈的电商搜索广告多目标竞价优化
  6. 浏览器如何工作:在现代web浏览器场景的之下
  7. scrapy源码2:scheduler的源码分析
  8. Web前端下载文件的几种常见方式
  9. 50句英语成语:别想望文生义
  10. python知识图谱实战_知识图谱实战