Backbone sync error even after response code 200
Backbone.Model.save()
expects the response from the server to be an updated hash of the model's values. If your response is of the kind {"msg":"Success"}
, Backbone may fail to sync with your model. Basically, it interprets your HTTP 200 JSON response as the model's attributes and tries to sync the model accordingly.
You might try either 1) Making your Spring controller path return a JSON-ified model response, 2) Return a plain 200 with an empty response body or 3) write a custom parse method which looks for responses with the {"msg":"Success"}
format and responds differently.