1、 接收的是 application/json 类型
a、
@GetMapping("/demo/{id}")
public void hello(@PathVariable(name = "id") String id)
b、
@PostMapping(path = "/demo1")
public void demo1(@RequestBody Map<String, String> person) {
2、接收的是 form表单
@PostMapping(path = "/demo2")
public void demo2(Person person) {
原文地址:
https://blog.csdn.net/suki_rong/article/details/80445880
网友评论