@Configuration @RibbonAutoConfiguration.ConditionalOnRibbonRestClient protected static class RibbonClientConfiguration.RestClientRibbonConfiguration extends Object
Modifier | Constructor and Description |
---|---|
protected |
RestClientRibbonConfiguration() |
Modifier and Type | Method and Description |
---|---|
com.netflix.niws.client.http.RestClient |
ribbonRestClient(com.netflix.client.config.IClientConfig config,
com.netflix.loadbalancer.ILoadBalancer loadBalancer,
ServerIntrospector serverIntrospector,
com.netflix.client.RetryHandler retryHandler)
Create a Netflix
RestClient integrated with Ribbon if none already exists
in the application context. |
@Bean @Lazy @ConditionalOnMissingBean(value=com.netflix.client.AbstractLoadBalancerAwareClient.class) public com.netflix.niws.client.http.RestClient ribbonRestClient(com.netflix.client.config.IClientConfig config, com.netflix.loadbalancer.ILoadBalancer loadBalancer, ServerIntrospector serverIntrospector, com.netflix.client.RetryHandler retryHandler)
RestClient
integrated with Ribbon if none already exists
in the application context. It is not required for Ribbon to work properly and is
therefore created lazily if ever another component requires it.config
- the configuration to use by the underlying Ribbon instanceloadBalancer
- the load balancer to use by the underlying Ribbon instanceserverIntrospector
- server introspector to use by the underlying Ribbon instanceretryHandler
- retry handler to use by the underlying Ribbon instanceRestClient
instances backed by RibbonCopyright © 2017 Pivotal Software, Inc.. All rights reserved.