From 88d16ddf6b84345f46b3426ec1562017edc8c697 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 26 Jun 2017 13:36:34 +0200 Subject: [PATCH 1/2] Add missing class check Closes gh-9602 --- .../actuate/autoconfigure/HealthIndicatorAutoConfiguration.java | 1 + 1 file changed, 1 insertion(+) 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 e6855de2f7..4640ad8484 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 @@ -258,6 +258,7 @@ public class HealthIndicatorAutoConfiguration { } @Configuration + @ConditionalOnClass(MongoTemplate.class) @ConditionalOnBean(MongoTemplate.class) @ConditionalOnEnabledHealthIndicator("mongo") public static class MongoHealthIndicatorConfiguration extends From 58a1ed19a915f323ae795ac299e056ec6a8f0a33 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 26 Jun 2017 13:36:57 +0200 Subject: [PATCH 2/2] Polish --- .../boot/autoconfigure/cache/CacheAutoConfigurationTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ac41e74dbe..c91a5c686a 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 @@ -433,7 +433,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(