-
Notifications
You must be signed in to change notification settings - Fork 38.5k
BeanDefinitionRegistryPostProcessor registered via @Bean will not be invoked [SPR-7868] #12525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Chris Beams commented Behavior Confirmed. Notice that Good catch, thanks for filing the issue! |
Chris Beams commented Topic branch: https://github.com/cbeams/spring-framework/commits/SPR-7868. An early fix is there, but will need refinement. |
Chris Beams commented This is a fundamental limitation of the |
Jarle Søberg commented A possible work-around for this issue is to implement BeanDefinitionRegistryPostProcessor and PriorityOrdered as part of the definition of the Configuration:
|
Henryk Konsek opened SPR-7868 and commented
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.
Affects: 3.0.5
Attachments:
Issue Links:
@Configuration
classesThe text was updated successfully, but these errors were encountered: