Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2444

Internal Spring beans should be ignored

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.1
    • 1.4.2, 1.5-M1
    • wicket-spring
    • None

    Description

      When looking up Spring beans by type (to inject into @SpringBean fields), the injector should ignore internal beans, like the ones generated by the <aop:scoped-proxy/> element at the configuration. In this case, the generated name always starts with 'scopedTarget.'.

      Other cases can be identified by the method 'BeanFactoryUtils.isFactoryDereference(name)'.

      These beans are created by the container to be used internally, so, shouldn't be considered for injection. The problem is, they usually have a mirror bean (which is the really injected by the container), so, when Wicket's injector tries to find it, it doesn't find unique beans of the type, forcing us to declare the bean name explicitly.

      Attachments

        1. SpringBeanLocator.patch
          2 kB
          Ronald Tetsuo Miura

        Activity

          People

            ivaynberg Igor Vaynberg
            ronaldtm Ronald Tetsuo Miura
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: