Skip to content

getBeanNamesForType should consider FactoryBean generics for early introspection of config classes as well [SPR-11480] #16105

Closed as not planned

Description

@spring-projects-issues

Phil Webb opened SPR-11480 and commented

Spring Boot was recently updated to consider FactoryBean generics. This could be ported into BeanFactoryUtils if useful.

See spring-projects/spring-boot#355 & spring-projects/spring-boot@5d591ed


Affects: 4.0.2

Issue Links:

0 votes, 5 watchers

Activity

  1. spring-projects-issues commented on Feb 25, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    Aren't we talking about ListableBeanFactory's getBeansOfType here? BeanFactoryUtils only really contains an algorithm for accumulation over a factory hierarchy...

    Juergen

  2. spring-projects-issues commented on Feb 25, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Phil Webb commented

    Right, my mistake. We call BeanFactoryUtils, but the enhancement should be in the ListableBeanFactory implementation. I have updated the description.

  3. spring-projects-issues commented on Jun 6, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    To the best of my attempts to reproduce this, it all works fine after context refresh. So I suppose we're only really talking about introspection of factory method return types before the containing Class has been resolved? This is an assumption in the current getTypeForFactoryBean algorithm, after all: It only starts looking at factory method return type signatures for bean definitions with the bean class name already resolved to a Class...

    Juergen

  4. added
    type: enhancement
    in: core
    on Jan 11, 2019
  5. jhoeller commented on Jan 3, 2024

    @jhoeller
    Contributor

    Closing this in favor of the more general #18558. Optimized FactoryBean resolution is still a topic to be investigated but I don't see any specific action we can take for this ticket here.

  6. added
    status: superseded
    on Jan 3, 2024
  7. removed this from the 6.x Backlog milestone on Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: corestatus: supersededtype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions