From 8b20403c410bdd2c313f0cc0fde981b0490e8d51 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 18 Mar 2015 11:13:46 +0000 Subject: [PATCH] Use a String when referencing a class with @ConditionalOnMissingClass Using a Class reference can cause reflection problems at runtime (see gh-1065). Closes gh-2674 --- .../autoconfigure/EndpointWebMvcChildContextConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java index 0ab07400b3..3c3273f52b 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java @@ -158,7 +158,7 @@ public class EndpointWebMvcChildContextConfiguration { * configures the security filter. */ @Configuration - @ConditionalOnMissingClass(WebSecurityConfigurerAdapter.class) + @ConditionalOnMissingClass(name = "org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter") protected static class EndpointHandlerMappingConfiguration { @Autowired(required = false)