SpringMVC error 400 about ajax submission (obtain in the background as null), springmvcajax
There are three possible 400 errors
1: The request data volume is too large, but this situation is generally rare.
2: The request url is incorrect. Check whether the url is correct.
3: The request data parameter is incorrect. Make sure that each parameter can be requested.
Note: In the past, the error 400 was reported. If the backend parameter is null, the error is due to the third case. After parameter troubleshooting (the method is a bit stupid). It turns out that an error occurred while obtaining the 'time' parameter.
If there are comrades in the same situation as me, you try to remove the "time" parameter, get it, or convert the obtained js object to a date object in js for request.
JS:
HTML:
Ajax:
Solution: convert an object to a date object
The background will be able to see
The object has been caught, and how can we get it with you. Hey
Copyright Disclaimer: This article is an original article without code and cannot be reproduced without permission.