mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-28 06:42:49 +00:00
SEC-1720: Avoid bean-creation side-effects in ContextSourceSettingPostProcessor.
This commit is contained in:
parent
04d42211b1
commit
2888f2b86f
@ -36,12 +36,12 @@ class ContextSourceSettingPostProcessor implements BeanFactoryPostProcessor, Ord
|
|||||||
"jar file in your application", e);
|
"jar file in your application", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] sources = bf.getBeanNamesForType(contextSourceClass);
|
String[] sources = bf.getBeanNamesForType(contextSourceClass, false, false);
|
||||||
|
|
||||||
|
|
||||||
if (sources.length == 0) {
|
if (sources.length == 0) {
|
||||||
throw new ApplicationContextException("No BaseLdapPathContextSource instances found. Have you " +
|
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) {
|
if (!bf.containsBean(BeanIds.CONTEXT_SOURCE) && defaultNameRequired) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user