解决方案是使用@RequestHeader批注而不是伪装的特定批注
@FeignClient(name="Simple-Gateway")
interface GatewayClient {
@RequestMapping(method = RequestMethod.GET, value = "/gateway/test")
String getSessionId(@RequestHeader("X-Auth-Token") String token);
}
在Feign客户端+ Spring Cloud(Brixton RC2)中将@Headers与动态值一起使用
解决方案是使用@RequestHeader批注而不是伪装的特定批注
@FeignClient(name="Simple-Gateway")
interface GatewayClient {
@RequestMapping(method = RequestMethod.GET, value = "/gateway/test")
String getSessionId(@RequestHeader("X-Auth-Token") String token);
}