Spring MVC返回Json对象时406错误

Spring MVC返回Json对象时406错误,解决方法:
在工程的pom.xml中加入


<dependency>
    <groupId>org.codehaus.jacksongroupId>
    <artifactId>jackson-core-aslartifactId>
    <version>1.9.13version>
dependency>
<dependency>
    <groupId>org.codehaus.jacksongroupId>
    <artifactId>jackson-mapper-aslartifactId>
    <version>1.9.13version>
dependency>
<dependency>
    <groupId>com.fasterxml.jackson.coregroupId>
    <artifactId>jackson-databindartifactId>
    <version>2.8.11.3version>
dependency>

你可能感兴趣的:(Java相关)