feign接口无法传递参数 (初学者)

//修改用户信息
@PutMapping("user/update")
public Result update(@RequestBody User user);
一种是将所需要的数据类型放在请求体中 用@requestBody 来获取

//发送短信验证码
@RequestMapping("/validateCode/send4retrieve/{telephone}")
public Result send4retrieve( @PathVariable("telephone") String telephone);
一种是将所需要的数据类型放在请求头中 用@PathVariable 来获取 restful风格


 

猜你喜欢

转载自www.cnblogs.com/yxxhndm/p/12791475.html
今日推荐