Spring MVC + Ajax JSON post
问题 I have a problem with send JSON to the Controller . I can't understand my problem. So, url - /notes/{username}/add Ajax : $.ajax({ type: "POST", contentType : 'application/json; charset=utf-8', dataType : 'json', url: window.location.pathname, data: JSON.stringify({ title: $("#title").val(), text: $("#text").val() }), success : function() { $("#title").val(""); $("#text").val(""); } }); Controller : @RequestMapping(value = "/{username}/add", method = POST) public void add(@RequestBody Note