Skip to content

Add convenient method to get generic beans by type reference #34669

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

Closed
wants to merge 1 commit into from

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Mar 28, 2025

Feel free to close if the team think it's not worthy.

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 28, 2025
@jhoeller
Copy link
Contributor

Actually, I'd like to avoid such further overloads there. If at all, we'd introduce a getBeanProvider(ParameterizedTypeReference) method (since there is no getBean(ResolvableType) method either, just getBeanProvider(ResolvableType)), and such an ObjectProvider-returning method would then just have the ResolvableType.forType convenience without further value.

Thanks for the PR, in any case!

@jhoeller jhoeller closed this Mar 28, 2025
@jhoeller jhoeller added status: declined A suggestion or change that we don't feel we should currently apply in: core Issues in core modules (aop, beans, core, context, expression) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Mar 28, 2025
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: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants