java远程调用传参总结
请求参数格式分为三种
x-www-form-urlencoded
https://xxx/getUserByRoleCode/{roleCode}
@PathVariable("roleCode") String roleCode
form-data
@GetMapping("/role/user/list")
WebResult<List<PlatformUserDTO>> getUsersByRole(@RequestParam(value = "roleCode") String roleCode);
raw(json格式)
@PostMapping("/functionSwitch")
@ApiOperation("功能开关")
public WebResult<IPage<SysFunctionSwitch>> functionSwitch(@RequestBody PageFilter<SysFunctionSwitch> filter) {
return WebResult.ok(sysFunctionSwitchService.switchPage(filter));
}