Merged bean definitions are now cached early and selectively evicted after post-processing and before actual bean creation

Issue: SPR-12236
This commit is contained in:
Juergen Hoeller
2015-07-15 00:05:39 +02:00
parent 37f74e76f6
commit 09eb492079
4 changed files with 46 additions and 2 deletions

View File

@@ -179,6 +179,10 @@ class PostProcessorRegistrationDelegate {
nonOrderedPostProcessors.add(beanFactory.getBean(postProcessorName, BeanFactoryPostProcessor.class));
}
invokeBeanFactoryPostProcessors(nonOrderedPostProcessors, beanFactory);
// Clear cached merged bean definitions since the post-processors might have
// modified the original metadata, e.g. replacing placeholders in values...
beanFactory.clearMetadataCache();
}
public static void registerBeanPostProcessors(