add short explanation in javadoc

This commit is contained in:
Bertrand Renuart
2015-04-28 11:26:50 +02:00
parent e2fa45f960
commit df8c637a57

View File

@@ -88,8 +88,17 @@ public class RibbonClientConfiguration {
return serverList;
}
/**
* Create a Netflix {@link 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.
*
* @param config the configuration to use by the underlying Ribbon instance
* @param loadBalancer the load balancer to use by the underlying Ribbon instance
* @return a {@link RestClient} instances backed by Ribbon
*/
@Bean
@Lazy // see https://github.com/spring-cloud/spring-cloud-netflix/issues/312
@Lazy
@ConditionalOnMissingBean
public RestClient ribbonRestClient(IClientConfig config, ILoadBalancer loadBalancer) {
RestClient client = new OverrideRestClient(config);