Use HystrixFeign only if it's present on classpath (#544)

This commit is contained in:
Denis Stepanov
2017-03-22 10:43:56 +01:00
committed by Marcin Grzejszczak
parent e9480898b5
commit 327ce80c38

View File

@@ -52,7 +52,7 @@ public class TraceFeignClientAutoConfiguration {
@Bean
@Scope("prototype")
@ConditionalOnClass(name = "com.netflix.hystrix.HystrixCommand")
@ConditionalOnClass(name = {"com.netflix.hystrix.HystrixCommand", "feign.hystrix.HystrixFeign"})
@ConditionalOnProperty(name = "feign.hystrix.enabled", matchIfMissing = true)
Feign.Builder feignHystrixBuilder(BeanFactory beanFactory) {
return SleuthHystrixFeignBuilder.builder(beanFactory);