Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-15417

Functional bean dependencies tracking

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 5.0 RC1
    • Component/s: Core:DI
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      The new functional bean registration mechanism gets the type of the bean to register (via an explicit class parameter in Java or via reified type parameters in Kotlin) but unlike JavaConfig which declare explicitly bean dependencies as input @Bean method parameters, the functional variant don't know what bean dependency are needed because it is based on opaque applicationContext.getBean() invocations performed by the Supplier implementation.

      Tracking those applicationContext.getBean() invocations would allow the functional bean registration mechanism to build the same kind of bean dependency graph than with JavaConfig, allowing to cover the same use cases and improving consistency between both approaches.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                juergen.hoeller Juergen Hoeller
                Reporter:
                sdeleuze Sébastien Deleuze
                Last updater:
                Stéphane Nicoll
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 23 weeks, 6 days ago