HTTP Status 406. Spring MVC 4.0, jQuery, JSON

前端 未结 5 1740
栀梦
栀梦 2020-12-02 00:58

I want to send JSON from my controller. I have the following configuration.

spring-servlet.xml :



        
5条回答
  •  青春惊慌失措
    2020-12-02 01:09

    I had the same problem in the end it was the version of org.codehaus.jackson 1.9.x, when I switched from 1.9.x jackson to 2.x (fasterxml) in my pom.xml

    
    com.fasterxml.jackson.core
    jackson-core
    2.2.3
    
    
    
    com.fasterxml.jackson.core
    jackson-databind
    2.2.3
    
    
    
    com.fasterxml.jackson.core
    jackson-annotations
    2.2.3
    
    
    

    also is necesary :

提交回复
热议问题