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

Consistent support for generic FactoryBean type matching when using getBeanProvider #32590

Closed
jhoeller opened this issue Apr 8, 2024 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@jhoeller
Copy link
Contributor

jhoeller commented Apr 8, 2024

Related to #32489, there is an inconsistency between @Autowired injection point resolution and getBeanProvider return values in that the former takes targetType into account for generic FactoryBean type resolution (in its second step in GenericTypeAwareAutowireCandidateResolver) whereas the latter does not (due to the single type matching step in DefaultListableBeanFactory itself). This can be brought in sync through letting a FactoryBean instance go through the same matching steps as a regular bean instance with generics.

@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Apr 8, 2024
@jhoeller jhoeller added this to the 6.1.6 milestone Apr 8, 2024
@jhoeller jhoeller self-assigned this Apr 8, 2024
@jhoeller jhoeller changed the title Consistent support for generic FactoryBean type resolution when using getBeanProvider Consistent support for generic FactoryBean type matching when using getBeanProvider Apr 8, 2024
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

1 participant