ajax json异步springmvc http请求返回状态码为406的解决

前端之家收集整理的这篇文章主要介绍了ajax json异步springmvc http请求返回状态码为406的解决前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

是因为缺少json相关jar包,网上很多人只是给出了前两个jar,其实不全,依旧406,应该给出四个

    <!-- https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-mapper-asl -->
<dependency>
    <groupId>org.codehaus.jackson</groupId>
    <artifactId>jackson-mapper-asl</artifactId>
    <version>1.9.13</version>
</dependency>
    <!-- https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-core-asl -->
<dependency>
    <groupId>org.codehaus.jackson</groupId>
    <artifactId>jackson-core-asl</artifactId>
    <version>1.9.13</version>
</dependency>
    <dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>2.4.1</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.4.1.1</version>
</dependency>
原文链接:https://www.f2er.com/springmvc/161072.html

猜你在找的SpringMVC相关文章