I want to overwrite Ribbon IRule. public Server choose(ILoadBalancer lb, Object key) but I found 'key' is null. how can I solve?

i know issues/1272 solved。 but this is in the zuul RequestContext.getCurrentContext().set(LOAD_BALANCER_KEY, "any value you want"); my question is how to set loadBalancerKey in the FeignLoadBalancer?

in the 2.0.1.RELEASE

Comment From: OlgaMaciaszek

@SkillyZ Please switch to the Hoxton release train. Any versions below 2.2.x are not supported anymore.

FeignLoadBalancer extends AbstractLoadBalancerAwareClient. That allows you to override buildLoadBalancerCommand(RibbonRequest request, IClientConfig config) method and pass the key. Is that helpful?

If not, please provide a minimal, complete, verifiable example that shows your usecase.

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.