Category : spring-cloud

Order This article mainly studies the Caching SpringloadBalancerFactory of spring cloud. CachingSpringLoadBalancerFactory spring-cloud-openfeign-core-2.2.0.M1-sources.jar! /org/springframework/cloud/openfeign/ribbon/CachingSpringLoadBalancerFactory.java public class CachingSpringLoadBalancerFactory { protected final SpringClientFactory factory; protected LoadBalancedRetryFactory loadBalancedRetryFactory = null; private volatile Map<String, FeignLoadBalancer> cache = new ConcurrentReferenceHashMap<>(); public CachingSpringLoadBalancerFactory(SpringClientFactory factory) { this.factory = factory; } public CachingSpringLoadBalancerFactory(SpringClientFactory factory, LoadBalancedRetryFactory loadBalancedRetryPolicyFactory) { this.factory = factory; this.loadBalancedRetryFactory = loadBalancedRetryPolicyFactory; ..

Read more

Order This article mainly studies eager load of spring cloud netflix ribbon. RibbonAutoConfiguration spring-cloud-netflix-ribbon-2.1.1.RELEASE-sources.jar! /org/springframework/cloud/netflix/ribbon/RibbonAutoConfiguration.java @Configuration @Conditional(RibbonAutoConfiguration.RibbonClassesConditions.class) @RibbonClients @AutoConfigureAfter(name = “org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration”) @AutoConfigureBefore({ LoadBalancerAutoConfiguration.class, AsyncLoadBalancerAutoConfiguration.class }) @EnableConfigurationProperties({ RibbonEagerLoadProperties.class, ServerIntrospectorProperties.class }) public class RibbonAutoConfiguration { @Autowired(required = false) private List<RibbonClientSpecification> configurations = new ArrayList<>(); @Autowired private RibbonEagerLoadProperties ribbonEagerLoadProperties; @Bean public HasFeatures ribbonFeature() { return HasFeatures.namedFeature(“Ribbon”, Ribbon.class); } ..

Read more