Allow MergedBeanDefinitionPostProcessor to handle bean creation
This commit registers the MergedBeanDefinitionPostProcessor instances on the BeanFactory processed for AOT purposes. This allows beans that are created at build-time to be post-processed for low-level needs such as initialization and autowiring. Closes gh-28777
This commit is contained in:
@@ -364,7 +364,7 @@ final class PostProcessorRegistrationDelegate {
|
||||
* Register the given BeanPostProcessor beans.
|
||||
*/
|
||||
private static void registerBeanPostProcessors(
|
||||
ConfigurableListableBeanFactory beanFactory, List<BeanPostProcessor> postProcessors) {
|
||||
ConfigurableListableBeanFactory beanFactory, List<? extends BeanPostProcessor> postProcessors) {
|
||||
|
||||
if (beanFactory instanceof AbstractBeanFactory) {
|
||||
// Bulk addition is more efficient against our CopyOnWriteArrayList there
|
||||
@@ -439,6 +439,7 @@ final class PostProcessorRegistrationDelegate {
|
||||
Class<?> beanType = resolveBeanType(bd);
|
||||
postProcessRootBeanDefinition(postProcessors, beanName, beanType, bd);
|
||||
}
|
||||
registerBeanPostProcessors(this.beanFactory, postProcessors);
|
||||
}
|
||||
|
||||
private void postProcessRootBeanDefinition(List<MergedBeanDefinitionPostProcessor> postProcessors,
|
||||
|
||||
Reference in New Issue
Block a user