您的位置:首页 > 理论基础 > 计算机网络

Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: Cou

2017-06-01 11:29 871 查看
var para={id:"",name:""};
$.ajax({
type:"post",
url:/inmp/addUser,
async:false,
dataType:'json',
contentType:'application/json;character:utf-8',
data:JSON.stringify(para),
success:function(value){

alert(value);
if(value === 'success'){

}else{

alert("删除失败!");
}
}
});


错误原因:

没有写:

1、contentType:'application/json;character:utf-8',
2、JSON.stringify()


错误详情:

org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver handleHttpMessageNotReadable
警告: Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: Could not read document: Unrecognized token 'operatorname': was expecting ('true', 'false' or 'null')
at [Source: java.io.PushbackInputStream@b33169a; line: 1, column: 14]; nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'operatorname': was expecting ('true', 'false' or 'null')
at [Source: java.io.PushbackInputStream@b33169a; line: 1, column: 14]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐