@RequestParam用来接收:

 1 用来处理简单的参数绑定

2 用来接收 Content-Type 是   application/x-www-form-urlencoded (这种格 式的数据例如 user=1234&pwd=1234)编码的内容,这是浏览器默认的 content-Type(请求内容)格式.

@RequestBody的用法:

1用来处理不是 application/x-www-form-urlencoded 编码的内容例如:application/json  application/xml    

 

参考内容:https://www.cnblogs.com/szlbm/p/5867529.html

   https://blog.csdn.net/jiangcs520/article/details/70141901/

https://blog.csdn.net/leftfist/article/details/79053389

https://blog.csdn.net/qq_28702545/article/details/51719199   

相关文章:

  • 2022-12-23
猜你喜欢
  • 2021-06-18
  • 2022-12-23
相关资源
相似解决方案