Skip to content

BeanDefinitionRegistryPostProcessor registered via @Bean will not be invoked [SPR-7868] #12525

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions