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

Fix find RootBeanDefinition strategy in class FactoryAwareOrderSourceProvider #28374

Closed

Conversation

tommas1988
Copy link

Consider ancestor bean factories for finding RootBeanDefinition in class FactoryAwareOrderSourceProvider.

Currently the code will only find RootBeanDefinition for a bean name in current bean factory, and null if no bean definition is found for the searching bean name. Not consider any ancestor bean factories. This is the cause of the bug of issues 2466 spring-cloud-gateway

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 24, 2022
@tommas1988
Copy link
Author

rebuild

@jhoeller jhoeller self-assigned this Aug 8, 2022
@rstoyanchev rstoyanchev added the in: core Issues in core modules (aop, beans, core, context, expression) label Feb 9, 2023
@tommas1988 tommas1988 closed this Feb 27, 2023
@bclozel bclozel reopened this Feb 27, 2023
@jhoeller
Copy link
Contributor

Your submitted test case works fine against the latest state of the framework, so I assume something else must have been in the way there. Note that getMergedBeanDefinition (as called by FactoryAwareOrderSourceProvider) is aware of parent factories already, so such a fallback should be transparent, with no need to perform explicit traversal in FactoryAwareOrderSourceProvider itself.

I'll add a test along those lines to make sure we do not cause any regressions here.

@jhoeller jhoeller closed this Nov 20, 2023
@jhoeller jhoeller added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 20, 2023
jhoeller added a commit that referenced this pull request Nov 22, 2023
jhoeller added a commit that referenced this pull request Nov 22, 2023
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) status: invalid An issue that we don't feel is valid
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants