mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
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
|
||||
@ConditionalOnExpression("${management.security.enabled:true} && !${security.basic.enabled:true}")
|
||||
@ConditionalOnMissingBean(WebSecurityConfiguration.class)
|
||||
@ConditionalOnWebApplication
|
||||
@EnableWebSecurity
|
||||
protected static class WebSecurityEnabler extends AuthenticationManagerConfiguration {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user