当前位置:网站首页>Send a post request at the front desk can't get the data

Send a post request at the front desk can't get the data

2022-08-10 13:34:00 T_Y_F666

The front desk cannot get the data when sending a post request

Error

The front desk cannot get the data when sending a post request

Solution

For the received parameter object is a string of type Json, so you need to add @RequestBody annotation
Insert image description here

reason

@RequestBody annotation works on the formal parameter list, inserts the HTTP request body into the method, and uses the appropriate HttpMessageConverter to write the request body into an object.

Reference content
@ResponseBody

Original is not easy
Please indicate the source for reprinting
If it helps you, don’t forget to like and support
insert image description here

原网站

版权声明
本文为[T_Y_F666]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/222/202208101303211392.html