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
pull/2035/head
Marius Bogoevici 10 years ago committed by Andy Wilkinson
parent a8af254765
commit 5c84e17d10

@ -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 {
}

Loading…
Cancel
Save