-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Allow BeanDefinitionRegistryPostProcessor to register other BeanDefinitionRegistryPostProcessors [SPR-10630] #15258
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
Phil Webb commented What do you think of this idea and the pull request #299 I am not sure if the #12525 was marked as WONTFIX for a reason. Could this also be backported to 3.2.x? /cc Chris Beams |
Rob Winch commented Juergen Hoeller I'm not sure this is working properly, but please correct me if I am wrong. When using Javaconfig if I register a BeanDefinitionRegistryPostProcessor, the BeanDefinition does not appear to be populated (it exists but doesn't contain the metadata). The Javadoc on BeanDefinitionRegistryPostProcessor's postProcessBeanDefinitionRegistry method states:
My understanding is that since the beans have been loaded, then all the metadata should be present. Additionally, if I create a BeanDefinitionRegistryPostProcessor via XML the metadata for the BeanDefnition is populated properly. I have created a small sample project to illustrate the problem at https://github.com/rwinch/spring-security-sample/tree/SPR-10630 |
Juergen Hoeller commented Rob, I'm afraid there is a misunderstanding here: We aren't ever populating the ConstructorArgumentValues part from So this feature works as designed, even if it isn't metadata-compatible to its XML equivalent. There isn't much we can do about this since this is so inherent to the factory method mechanism. Juergen |
Phil Webb opened SPR-10630 and commented
See #12525, originally marked as WONTFIX but would be very useful for Spring Security
Issue Links:
@Bean
will not be invoked@Configuration
class@Bean
methods on@Configuration
class returned from another@Bean
method do not workReferenced from: commits bb971ce
The text was updated successfully, but these errors were encountered: