diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfiguration.java index 834b7e4804..7dcb7128f7 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfiguration.java @@ -262,6 +262,7 @@ public class HealthIndicatorAutoConfiguration { } @Configuration + @ConditionalOnClass(MongoTemplate.class) @ConditionalOnBean(MongoTemplate.class) @ConditionalOnEnabledHealthIndicator("mongo") public static class MongoHealthIndicatorConfiguration extends diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java index 068f4bae46..c620422324 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java @@ -434,7 +434,7 @@ public class CacheAutoConfigurationTests { } @Test - public void hazelcastCacheExplicit() { // Fail + public void hazelcastCacheExplicit() { load(new Class[] { HazelcastAutoConfiguration.class, DefaultCacheConfiguration.class }, "spring.cache.type=hazelcast"); HazelcastCacheManager cacheManager = validateCacheManager(