ajax向后台发送JSON数据出现: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported的错误。

Content type ‘application/x-www-form-urlencoded;charset=UTF-8’ not supported

使用post协议提交时,请检查Content type类型

请检查上方contentType类型,如果想用springmvc @RequestBody注解做提交json字符串自动绑定到pojo入参时,类型需要是"application/json;charset=UTF-8",否则会抛"not supported"异常。

contentType: "application/json;charset=UTF-8",

缺少jackson-databind jar包


    com.fasterxml.jackson.core
    jackson-databind
    2.8.8.1
 

你可能感兴趣的:(Ajax之json数据传递,Content,type)