PathVariable annotation was empty on param 0.和RequestParam.value() was empty on parameter 1错误
最近在用springcloud的Feign写项目时,定义feign 声明式客户端接口时报了这两个问题:
便是这段代码里:
@GetMapping(value = "/{userId}/score")
JsonResult<?> addScore(@PathVariable Integer userId,
@RequestParam Integer score);//@RequestParam在Controller中可以省略,此处不能省
原创
2021-01-18 11:08:16 ·
1183 阅读 ·
0 评论