Commit 4dda1814 authored by Stephane Nicoll's avatar Stephane Nicoll

Prevent bean early initialization

Fix `CacheManagerValidatorPostProcessor` that could lead to early bean
initialization.

Fixes gh-3440
parent 8cb6f7bc
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment