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

BeanDefinitionRegistryPostProcessor registered via @Bean will not be invoked

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.5
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      I created simple bean implementing BeanDefinitionRegistryPostProcessor. All I want to do is to register some bean definition in the BeanDefinitionRegistryPostProcessor#postProcessBeanDefinitionRegistry method. The problem is that code working with ClassPathXmlApplicationContext doesn't work with AnnotationConfigApplicationContext.

      My intelligent guess would be that BeanDefinitionRegistryPostProcessor#postProcessBeanDefinitionRegistry is called after JavaConfig bean postprocessor.

      I'm attaching minimal Maven project with two unit tests (XmlTest & AnnotationTest) to demonstrate the issue.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbeams Chris Beams
                Reporter:
                hekonsek Henryk Konsek
                Last updater:
                Jarle Søberg
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 2 weeks, 6 days ago