一、背调服务GET请求
1、使用@RequestParam
@GetMapping("/audit/list/page")
R fetchAuditListPage(@RequestParam(name = "page", defaultValue = "1") int page,
@RequestParam(name = "size", defaultValue = "20") int size);
2、使用@RequestParam 不能与 @RequestBody 一起使用
@GetMapping("/audit/list")
R fetchAuditList(@RequestParam(name = "page", defaultValue = "1") int page,
@RequestParam(name = "size", defaultValue = "20") int size,
@RequestBody SupGoodsSpuAuditQO auditQO)
3、使用@RequestParam 与 @SpringQueryMap 一起使用
@GetMapping("/audit/list")
R fetchAuditList(@RequestParam(name = "page", defaultValue = "1") int page,
@RequestParam(name = "size", defaultValue = "20") int size,
@SpringQueryMap SupGoodsSpuAuditQO auditQO)
4、不能使用 @RequestBody
@GetMapping(value = "/audit/deleteDepot")
R deleteDepot(@RequestBody DepotDTO depotDTO);
网友评论