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

Use available type information in functional bean definitions for resolving FactoryBean type

    XMLWordPrintable

    Details

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

      Description

      I encountered a nasty problem with some functional bean registrations, caused by early an instantiation cascade driven from a BeanFactoryPostProcessor in Spring Data. The issue comes back to the BFPP wanting to find bean definitions of a certain type, so it uses BeanFactory.getType(String), which could have used the ResolvableType information that was available for the functional bean definition, but didn't and fell back to instantiating the bean to check its runtime concrete type. The offending code is in AbstractBeanFactory.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              david_syer Dave Syer
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 30 weeks, 1 day ago