POST JSON fails with 415 Unsupported media type, Spring 3 mvc

I’ve had this happen before with Spring @ResponseBody and it was because there was no accept header sent with the request. Accept header can be a pain to set with jQuery, but this worked for me source $.postJSON = function(url, data, callback) { return jQuery.ajax({ headers: { ‘Accept’: ‘application/json’, ‘Content-Type’: ‘application/json’ }, ‘type’: ‘POST’, ‘url’: … Read more