`
sophiawhut
  • 浏览: 101359 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

The resource identified by this request is only capable of generating responses

阅读更多

今天在调试springMVC的时候,在将一个对象返回为json串的时候,浏览器中出现异常:

 

The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers ().

这个错误是因为applicationContext缺少配置json转化bean:

 

<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.MappingJacksonHttpMessageConverter">  
        <property name="supportedMediaTypes">  
            <list>  
                <value>application/json;charset=UTF-8</value>  
            </list>  
        </property>  
    </bean>  

 

分享到:
评论

相关推荐

    servlet2.4doc

    The doFilter method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain. doGet...

    Estimating the Size of Criminal Populations

    The estimation of total population size for various phenomena of crime is an important factor critical for criminal justice policy formulation and criminological theory development. In this paper, ...

    NewSID(光学习一下代码就可以了,没看清楚介绍别运行)

    This functionality makes it possible to move a Backup Domain Controller (BDC) to a new Domain, since a BDC‘s relationship to a Domain is identified by it having the same computer SID as the other ...

    数位板压力测试

    When the user is viewing the device in its normal position, the coordinate origin will be at the lower left of the device. The coordinate system will be right-handed, that is, the positive x axis ...

    Virtualization Overhead of Multithreading in X86 State of the Ar

    This is exacerbated by user-level spinning, where threads wait for a resource without relinquishing the processor, consuming cycles without productive work being done. Another factor is NUMA (Non-...

    计算机网络第六版答案

    This document contains the solutions to review questions and problems for the 5th edition of Computer Networking: A Top-Down Approach by Jim Kurose and Keith Ross. These solutions are being made ...

    【2013】小波变换移动载荷损伤识别.pdf

    wavelet transform diagrams using the vertical acceleration responses show that damage can be identified and localized even with significant percentages of noise. Nevertheless, the method is improved ...

    An In-Depth Analysis of the Security of the Connected Repair Shop

    In this paper, we present a security analysis of delivering diagnostics services to the connected car in future connected repair shops. The repair shop will mainly provide two services; vehicle ...

    polycom宝利通视频会议软件3.9 2018

    by accepting these terms or by installing, downloading, copying, or otherwise using the SOFTWARE PRODUCT, you agree to be and will be bound by the terms of this Agreement as a condition of your ...

    解决mysql问题identified by 'password' with grant option

    You have an error in your SQL ... check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'password' with grant option' mysql 5和mysql 8都有这个问题

    AVG 破解版

    2. Translation, editing, arrangement and other software revisions, as well as parts thereof, and reproduction of the results achieved by this shall be permitted only as far as required for the ...

    Win32API帮助文档

    The application uses the specified identifier for notification messages that it sends to the the appbar identified by the hWnd member. This member is used when sending the ABM_NEW message. uEdge ...

    微软内部资料-SQL性能优化5

    The only source of any storage location information is the sysindexes table, which keeps track of the address of the root page for every index, and the first IAM page for the index or table....

    IEEE-SWEBOK-2004

    been identified by the IEEE Computer Society as crucial for the evolution of software engineering towards professional status. This Guide, written under the auspices of the Professional Practices ...

    Facts and Fallacies of Software Engineering

    The practice of building software is a "new kid on the block" technology. Though it may not seem this way for those who have been in the field for most of their careers, in the overall scheme of ...

    SFF-8432协议

    SFF对光模块的各种标准及定义 This specification defines the mechanical specifications for the Improved ...Support: This specification is supported by the identified member companies of the SFF Committee.

    Handbook of Research on Soft Computing and Nature-Inspired Algorithms

    andanalysisofthemostusednaturedinspiredoptimizers(NIOs)thischapterdescribesthenotonly thestructuresofeachNIObutalsothestochasticoperatorsandthe...

    BlueToolInstall

    means any discrete modification to the Software made by Licensee pursuant to this agreement and any modified, altered, enhanced or adapted version of the Software, or derivative work thereof (as that ...

    汽车租赁系统 5.27 12000 20%.docx

    In the non-functional requirements of the system, the focus is on the attributes required for a system that controls and coordinates computers and external devices, supports application software ...

    Chinese Entity Linking Comprehensive

    This file contains the responses for each query as identified by human annotators at LDC. This file is tab delimited, with 4 fields total. The column descriptions are as follows: 1. query ID - ...

Global site tag (gtag.js) - Google Analytics