The front and back ends are separated in the project
The front end uses post request to send data to the back end, but there is an error:
Error: request failed with status code 500
We need to know that 500 represents (server internal error) the server encountered an error and was unable to complete the request.
Take a look at part of my original code:
Front end request:
Back end receiving entity and control layer code:
At this time, if you look carefully, you will find that the name of the parameter that my front-end carries when sending the request is userName and password
However, the backend uses the user name when receiving the front-end parameters and Password, so I changed it Front end userName——> username
Finally OK! If you also have this problem, you can check whether the parameters you send are consistent with those you receive, otherwise the parameters will be empty
</ div>
Similar Posts:
- [Solved] Cannot deserialize instance of `java.lang.String` out of START_OBJECT token
- 405 error reporting in Web Development
- Proxy error :couldnot proxy request [How to Solve]
- Request failed with status code 500 & Self referencing loop detected for property ‘xx‘ with type
- Resolved [org.springframework.web.bind.MissingServletRequestParameterException: Required request parameter ’email’ for method parameter type String is not present]
- Can not deserialize instance of java.lang.String out of START_OBJECT token
- [773]smtplib.SMTPServerDisconnected: Connection unexpectedly closed
- [Solved] uwsgi Error: 504 Gateway Time-out
- [Solved] org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part ‘file_data’ is not present
- Error: Failed to start component [How to Solve]