Today, when I was doing a demo, I found that the status of Ajax was 200, but I didn’t implement the correct method.
SpringMVC + ajax +jquery
When Spring MVC returned to String with the annotation @ResponseBody, the browser displayed 200 status codes, and the response header was in JSON format. The format Ajax did not consider it json, so it always executed the wrong method.
Then remove dataType= “json” and OK!
The above article solves the problem that AJAX return status 200 does not call success, which is all the content shared by the editor. I hope to give you a reference, and I hope you can support developpaer more.