Browse Source

Modified RibbonAutoConfiguration to support AsyncLoadBalancerInterceptor (#1507)

pull/6/head
Rob Worsnop 8 years ago committed by Spencer Gibb
parent
commit
af032476a8
  1. 6
      spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonAutoConfiguration.java

6
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonAutoConfiguration.java

@ -33,6 +33,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; @@ -33,6 +33,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.client.actuator.HasFeatures;
import org.springframework.cloud.client.loadbalancer.AsyncLoadBalancerAutoConfiguration;
import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory;
import org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
@ -42,6 +43,7 @@ import org.springframework.context.annotation.Bean; @@ -42,6 +43,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.retry.support.RetryTemplate;
import org.springframework.web.client.AsyncRestTemplate;
import org.springframework.web.client.RestTemplate;
import com.netflix.client.IClient;
@ -55,10 +57,10 @@ import com.netflix.ribbon.Ribbon; @@ -55,10 +57,10 @@ import com.netflix.ribbon.Ribbon;
* @author Dave Syer
*/
@Configuration
@ConditionalOnClass({ IClient.class, RestTemplate.class })
@ConditionalOnClass({ IClient.class, RestTemplate.class, AsyncRestTemplate.class})
@RibbonClients
@AutoConfigureAfter(name = "org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration")
@AutoConfigureBefore(LoadBalancerAutoConfiguration.class)
@AutoConfigureBefore({LoadBalancerAutoConfiguration.class, AsyncLoadBalancerAutoConfiguration.class})
public class RibbonAutoConfiguration {
@Autowired(required = false)

Loading…
Cancel
Save