Browse Source

SEC-1720: Avoid bean-creation side-effects in ContextSourceSettingPostProcessor.

pull/1/head
Luke Taylor 15 years ago
parent
commit
71ed6d7964
  1. 6
      config/src/main/java/org/springframework/security/config/ldap/ContextSourceSettingPostProcessor.java

6
config/src/main/java/org/springframework/security/config/ldap/ContextSourceSettingPostProcessor.java

@ -36,12 +36,12 @@ class ContextSourceSettingPostProcessor implements BeanFactoryPostProcessor, Ord @@ -36,12 +36,12 @@ class ContextSourceSettingPostProcessor implements BeanFactoryPostProcessor, Ord
"jar file in your application", e);
}
String[] sources = bf.getBeanNamesForType(contextSourceClass);
String[] sources = bf.getBeanNamesForType(contextSourceClass, false, false);
if (sources.length == 0) {
throw new ApplicationContextException("No BaseLdapPathContextSource instances found. Have you " +
"added an <" + Elements.LDAP_SERVER + " /> element to your application context?");
"added an <" + Elements.LDAP_SERVER + " /> element to your application context? If you have " +
"declared an explicit bean, do not use lazy-init");
}
if (!bf.containsBean(BeanIds.CONTEXT_SOURCE) && defaultNameRequired) {

Loading…
Cancel
Save