From 5c84e17d1096a729312d40ed464f2fcaf33bc5a4 Mon Sep 17 00:00:00 2001 From: Marius Bogoevici Date: Fri, 19 Sep 2014 16:04:42 -0400 Subject: [PATCH] Activate WebSecurityEnabler only for web applications Done in order to align with the rest of the configuration. Absent this check, the bean will be installed in non-web applications without the corresponding dependencies, causing the bootstrap to fail. Closes gh-1588 --- .../autoconfigure/ManagementSecurityAutoConfiguration.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementSecurityAutoConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementSecurityAutoConfiguration.java index f57bb8ac54..73c9760f9c 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementSecurityAutoConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementSecurityAutoConfiguration.java @@ -165,6 +165,7 @@ public class ManagementSecurityAutoConfiguration { @Configuration @ConditionalOnExpression("${management.security.enabled:true} && !${security.basic.enabled:true}") @ConditionalOnMissingBean(WebSecurityConfiguration.class) + @ConditionalOnWebApplication @EnableWebSecurity protected static class WebSecurityEnabler extends AuthenticationManagerConfiguration { }