var submitOptions = {
url : 'xxxxxxxxxxxxxx',
dataType : 'json',
type : 'POST',
data : "{id: '3123123-12312', descrpition: 'eqweqweq'}",
contentType: "application/json; charset=utf-8",
processData: false,
success : function(data) {
console.log(data);
}
};
$.ajax(submitOptions);
@RequestMapping(method = RequestMethod.POST, value = "xxxxxxxxxxxx")
public @ResponseBody ValidateMsg batchApprove(HttpServletRequest request) {
StringBuffer jb = new StringBuffer();
String line = null;
try {
BufferedReader reader = request.getReader();
while ((line = reader.readLine()) != null)
jb.append(line);
} catch (Exception e) { /* report an error */
}