-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
in: configAn issue in spring-security-configAn issue in spring-security-configtype: bugA general bugA general bug
Milestone
Description
Summary
Spring Security has a circular bean dependency in org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration
.
Actual Behavior
When running the sample (./gradlew bootRun
) with setting "allow circular references" to false
the application will fail to start.
The dependencies of some of the beans in the application context form a cycle:
┌─────┐
| org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration
└─────┘
Background
In our client's deployment they encountered a circular bean dependency in our own code (also a Spring Boot Project). We could not reproduce the issue, which is why we would like to check strictly on circular bean dependencies.
Expected Behavior
Resolved circular bean dependency.
Configuration
Set "allow circular references" to false
.
new SpringApplicationBuilder(SecurityCycleBeanDependencyApplication.class)
.initializers((ApplicationContextInitializer<GenericApplicationContext>) applicationContext -> applicationContext.setAllowCircularReferences(false))
.run(args);
Version
Spring Boot 1.5.6
with Spring Security and Spring Web
Sample
Metadata
Metadata
Assignees
Labels
in: configAn issue in spring-security-configAn issue in spring-security-configtype: bugA general bugA general bug