diff --git a/zipkin-server/src/main/java/zipkin/server/ZipkinServerConfiguration.java b/zipkin-server/src/main/java/zipkin/server/ZipkinServerConfiguration.java index 886e4e89fd8..3f7f9f016aa 100644 --- a/zipkin-server/src/main/java/zipkin/server/ZipkinServerConfiguration.java +++ b/zipkin-server/src/main/java/zipkin/server/ZipkinServerConfiguration.java @@ -75,8 +75,8 @@ SpanStore spanStore() { } @Configuration - @ConditionalOnClass(Brave.class) - protected static class BraveSpanStoreEnhancer implements BeanPostProcessor { + @ConditionalOnClass(name = "com.github.kristofa.brave.Brave") + static class BraveSpanStoreEnhancer implements BeanPostProcessor { @Autowired(required = false) Brave brave; @@ -161,7 +161,8 @@ static class KafkaConfiguration { class KafkaEnabledCondition extends SpringBootCondition { @Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata a) { - return context.getEnvironment().getProperty("kafka.zookeeper").isEmpty() ? + String kafkaZookeeper = context.getEnvironment().getProperty("kafka.zookeeper"); + return kafkaZookeeper == null || kafkaZookeeper.isEmpty() ? ConditionOutcome.noMatch("kafka.zookeeper isn't set") : ConditionOutcome.match(); }