平常划水文章——

spring cloadspring

org.springframework.cloud.openfeign.ribbon.CachingSpringLoadBalancerFactorythis

public FeignLoadBalancer create(String clientName) {         FeignLoadBalancer client = this.cache.get(clientName);         if(client != null) {             return client;         }         IClientConfig config = this.factory.getClientConfig(clientName);         ILoadBalancer lb = this.factory.getLoadBalancer(clientName);         ServerIntrospector serverIntrospector = this.factory.getInstance(clientName, ServerIntrospector.class);         client = loadBalancedRetryFactory != null ? new RetryableFeignLoadBalancer(lb, config, serverIntrospector,             loadBalancedRetryFactory) : new FeignLoadBalancer(lb, config, serverIntrospector);         this.cache.put(clientName, client);         return client;     }server

相關文章
相關標籤/搜索