There are various reasons, and here are only the solutions that I have used without problems
Option 1: FormData form
Refer to another blog I wrote, vue axios post request to pass FormData type parameters
This form can be used to transfer files
Option 2: Request body form
The front-end puts the parameters in the request body, and the back-end uses @RequestBody annotation to receive. It can be an entity class (@RequestBody VO vo) or a Map (@RequestBody Map map)
There is a qs library serialization solution available on the Internet, but I have some inexplicable problems with this solution. In the same post request method, when logging in, the backend can receive data; when modifying operations, the data received by the backend is always It is empty, and I can't solve it after a long time, so I gave up this solution, and then wrote this article