踩坑fegin @PathVariable在Fegin中使用

踩坑fegin @PathVariable在Fegin中使用

近期开发中,发现fegin接口缺少参数可能会引起注入时候启动报错

相关代码

1
2
@DeleteMapping(value = "/support/files/{id}")
Result<String> delete (@PathVariable String id);

在Fegin中如果使用@PathVariable注解的话比如指定相关接收参数正确代码如下:

1
2
@DeleteMapping(value = "/support/files/{id}")
Result<String> delete (@PathVariable(value = "id") String id);
  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!

扫一扫,分享到微信

微信分享二维码

请我喝杯咖啡吧~

支付宝
微信