Browse Source

Fix inappropriate eager init.

pull/23994/head
SchutzeHades 6 years ago committed by Juergen Hoeller
parent
commit
834ebc44f8
  1. 4
      spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java

4
spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java

@ -473,10 +473,10 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto @@ -473,10 +473,10 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
public String[] getBeanNamesForType(ResolvableType type, boolean includeNonSingletons, boolean allowEagerInit) {
Class<?> resolved = type.resolve();
if (resolved != null && !type.hasGenerics()) {
return getBeanNamesForType(resolved, includeNonSingletons, includeNonSingletons);
return getBeanNamesForType(resolved, includeNonSingletons, allowEagerInit);
}
else {
return doGetBeanNamesForType(type, includeNonSingletons, includeNonSingletons);
return doGetBeanNamesForType(type, includeNonSingletons, allowEagerInit);
}
}

Loading…
Cancel
Save