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
This commit is contained in:
parent
a8af254765
commit
5c84e17d10
|
|
@ -165,6 +165,7 @@ public class ManagementSecurityAutoConfiguration {
|
||||||
@Configuration
|
@Configuration
|
||||||
@ConditionalOnExpression("${management.security.enabled:true} && !${security.basic.enabled:true}")
|
@ConditionalOnExpression("${management.security.enabled:true} && !${security.basic.enabled:true}")
|
||||||
@ConditionalOnMissingBean(WebSecurityConfiguration.class)
|
@ConditionalOnMissingBean(WebSecurityConfiguration.class)
|
||||||
|
@ConditionalOnWebApplication
|
||||||
@EnableWebSecurity
|
@EnableWebSecurity
|
||||||
protected static class WebSecurityEnabler extends AuthenticationManagerConfiguration {
|
protected static class WebSecurityEnabler extends AuthenticationManagerConfiguration {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue