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

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',
 2JSON.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]

你可能感兴趣的:(SpringMVC)