Spring 3.x JSON status 406 “characteristics not acceptable according to the request ”accept“ headers ()”

后端 未结 14 1452
太阳男子
太阳男子 2020-12-13 01:50

Upon trying to get my response in JSON using Spring 3.x, I get the 406 error \"The resource identified by this request is only capable

14条回答
  •  温柔的废话
    2020-12-13 02:30

    I had this problem in Spring MVC 4. Adding jackson-annotations, jackson-core and jackson-databind didn't solve the problem. Try this libs:

    
      com.fasterxml.jackson.core
      jackson-core
      2.1.2
    
    
      com.fasterxml.jackson.core
      jackson-databind
      2.1.2
    
    
      org.codehaus.jackson
      jackson-mapper-asl
      1.9.13
    
    

提交回复
热议问题