Feign PathVariable annotation was empty on param 0.

使用Feign的时候,如果参数中带有

@PathVariable形式的参数,则要用value=""标明对应的参数,否则会抛出IllegalStateException异常

@PutMapping("/disuseable/{sn}")
ApiResponse disUseAble(@PathVariable String sn);   // wrong

-->
@PutMapping("/disuseable/{sn}")
ApiResponse disUseAble(@PathVariable(value="sn") String sn);  // right
posted @ 2017-11-07 10:38  每天多帅一点点  阅读(20868)  评论(0编辑  收藏  举报