Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to determine if circular references are prohibited or if the cycle just couldn't be broken #27289

Closed
wilkinsona opened this issue Aug 17, 2021 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@wilkinsona
Copy link
Member

Affects: 5.3

In Spring Boot 2.6, we intend to prohibit circular references by default with a configuration property and Java API to turn it back on again. As part of this, I'd like to update our BeanCurrentlyInCreationFailureAnalyzer to suggest that, as a last resort, circular references could be turned back on again to possibly break the cycle. I'd like to only suggest this if AbstractAutowireCapableBeanFactory.allowCircularReferences is false. Unfortunately, without resorting to reflection, I can't get the flag's value. Could an accessor please be added?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 17, 2021
@jhoeller jhoeller self-assigned this Aug 17, 2021
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Aug 17, 2021
@jhoeller jhoeller added this to the 5.3.10 milestone Aug 17, 2021
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants