我有一个Spring Cloud Feign客户端映射,定义如下:
@RequestMapping(method = RequestMethod.GET, value = "/list")
List<PojoVM> getList(@RequestAttribute (name = "cifNumber") String cifNumber);当我打电话的时候
public List<PojoVM> getList() {
return client.getList("100001");
}其他应用程序将此OpenFeign应用程序api调用作为POST接收,而不是GET
是否还有其他方式来使用@RequestAtrribute?
发布于 2020-08-04 16:18:24
我不知道注释@RequestAttribute。您应该改用@RequestParam (或@PathVariable)。
@RequestMapping(method = RequestMethod.GET, value = "/list")
List<PojoVM> getList(@RequestParam(name="cifNumber") String cifNumber);https://stackoverflow.com/questions/63242328
复制相似问题