Fixed wrong ConditionalOnClass

with this fix there no longer should be bugs related to a missing class.

fixes #363
This commit is contained in:
Marcin Grzejszczak
2016-08-02 23:28:26 -07:00
parent d7929943a3
commit 6d542f4f68
2 changed files with 2 additions and 5 deletions

View File

@@ -18,7 +18,6 @@ package org.springframework.cloud.sleuth.instrument.scheduling;
import java.util.regex.Pattern;
import org.aspectj.lang.ProceedingJoinPoint;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
@@ -52,7 +51,7 @@ public class TraceSchedulingAutoConfiguration {
*/
private @Value("${spring.sleuth.scheduled.skipPattern:}") String skipPattern;
@ConditionalOnClass(ProceedingJoinPoint.class)
@ConditionalOnClass(name = "org.aspectj.lang.ProceedingJoinPoint")
@Bean
public TraceSchedulingAspect traceSchedulingAspect(Tracer tracer, TraceKeys traceKeys) {
return new TraceSchedulingAspect(tracer, traceKeys, Pattern.compile(this.skipPattern));

View File

@@ -19,8 +19,6 @@ package org.springframework.cloud.sleuth.instrument.web.client.feign;
import java.io.IOException;
import java.lang.reflect.Type;
import com.netflix.hystrix.HystrixCommand;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -70,7 +68,7 @@ public class TraceFeignClientAutoConfiguration {
@Bean
@Scope("prototype")
@ConditionalOnClass(HystrixCommand.class)
@ConditionalOnClass(name = "com.netflix.hystrix.HystrixCommand")
@ConditionalOnProperty(name = "feign.hystrix.enabled", matchIfMissing = true)
Feign.Builder feignHystrixBuilder(BeanFactory beanFactory) {
return SleuthHystrixFeignBuilder.builder(beanFactory);