2014年2月17日星期一

Spring mvc @ResponseBody ajax调用出现如下错误:406 Not Acceptable

Spring mvc @ResponseBody  ajax调用出现如下错误:406 Not Acceptable
The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers ().

需要加入jackson依赖:
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.7.1</version>
        </dependency>

没有评论:

发表评论