st请求: 

@PostMapping(value="/user")

 

url:

localhost:8088/demo/user
首先设置Header:

postman使用教程

postman使用教程

 

 

1.2 post请求:

@RequestMapping(value="/user/{page}/{limit}",method={RequestMethod.GET,RequestMethod.POST})
public ResMessage queryPage(@RequestBody DTO dto,@PathVariable(required=true)int page,@PathVariable(required=true)int limit)

url:

http://localhost:8088/demo/user/2/3

 postman使用教程

postman使用教程

点击提交就可以了,

2.get请求

postman使用教程

4.put请求、Delete请求和post请求设置一下,这里不做赘述

 

注:Restful风格的请求,post(增)、删(delete)、改(put)、查(get)

相关文章:

  • 2021-09-19
  • 2021-12-20
  • 2021-12-22
  • 2021-10-24
猜你喜欢
  • 2022-12-23
  • 2021-08-26
  • 2021-12-02
相关资源
相似解决方案