Fixed wrong ConditionalOnClass
with this fix there no longer should be bugs related to a missing class. fixes #363
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user