@Configuration(proxyBeanMethods=false) @ConditionalOnClass(name="org.springframework.web.client.RestTemplate") @AutoConfigureAfter(name="org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration") public class DubboLoadBalancedRestTemplateAutoConfiguration extends Object implements org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.SmartInitializingSingleton
Configuration for @LoadBalanced
RestTemplate.| Constructor and Description |
|---|
DubboLoadBalancedRestTemplateAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
void |
adaptRestTemplates(org.springframework.context.event.ContextRefreshedEvent event)
Adapt the
RestTemplate beans that are annotated
@LoadBalanced and @LoadBalanced when
Spring Boot application started (after the callback of
SmartInitializingSingleton beans or
customization). |
void |
afterSingletonsInstantiated() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setBeanClassLoader(ClassLoader classLoader) |
public DubboLoadBalancedRestTemplateAutoConfiguration()
public void afterSingletonsInstantiated()
afterSingletonsInstantiated in interface org.springframework.beans.factory.SmartInitializingSingleton@EventListener(value=org.springframework.context.event.ContextRefreshedEvent.class) public void adaptRestTemplates(org.springframework.context.event.ContextRefreshedEvent event)
RestTemplate beans that are annotated
@LoadBalanced and @LoadBalanced when
Spring Boot application started (after the callback of
SmartInitializingSingleton beans or
customization).event - spring eventpublic void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwareCopyright © 2021 Pivotal Software, Inc.. All rights reserved.