Prevent bean early initialization
Fix `CacheManagerValidatorPostProcessor` that could lead to early bean initialization. Fixes gh-3440
This commit is contained in:
parent
8cb6f7bcb8
commit
4dda1814e2
|
|
@ -84,7 +84,7 @@ public class CacheAutoConfiguration {
|
|||
@Override
|
||||
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
|
||||
throws BeansException {
|
||||
for (String name : beanFactory.getBeanNamesForType(CacheAspectSupport.class)) {
|
||||
for (String name : beanFactory.getBeanNamesForType(CacheAspectSupport.class, false, false)) {
|
||||
BeanDefinition definition = beanFactory.getBeanDefinition(name);
|
||||
definition.setDependsOn(append(definition.getDependsOn(),
|
||||
VALIDATOR_BEAN_NAME));
|
||||
|
|
|
|||
Loading…
Reference in New Issue