Browse Source

Merge pull request #243 in CORE/base-third from ~ZACK/base-third:release/10.0 to release/10.0

* commit 'b7f2ae02db5f6103d50e86f07d21abd78168c2c6':
  REPORT-18472 spring集成10.0报错 我们的ContextLoader扫到了客户的web.xml里面的spring配置
bugfix/10.0
richie 5 years ago
parent
commit
ede27ae553
  1. 40
      fine-spring/src/com/fr/third/springframework/web/context/ContextLoader.java

40
fine-spring/src/com/fr/third/springframework/web/context/ContextLoader.java

@ -16,17 +16,6 @@
package com.fr.third.springframework.web.context;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import javax.servlet.ServletContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.fr.third.springframework.beans.BeanUtils;
import com.fr.third.springframework.beans.factory.access.BeanFactoryLocator;
import com.fr.third.springframework.beans.factory.access.BeanFactoryReference;
@ -43,7 +32,16 @@ import com.fr.third.springframework.core.io.support.PropertiesLoaderUtils;
import com.fr.third.springframework.util.Assert;
import com.fr.third.springframework.util.ClassUtils;
import com.fr.third.springframework.util.ObjectUtils;
import com.fr.third.springframework.util.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.ServletContext;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
/**
* Performs the actual initialization work for the root application context.
@ -494,20 +492,6 @@ public class ContextLoader {
List<Class<ApplicationContextInitializer<ConfigurableApplicationContext>>> classes =
new ArrayList<Class<ApplicationContextInitializer<ConfigurableApplicationContext>>>();
String globalClassNames = servletContext.getInitParameter(GLOBAL_INITIALIZER_CLASSES_PARAM);
if (globalClassNames != null) {
for (String className : StringUtils.tokenizeToStringArray(globalClassNames, INIT_PARAM_DELIMITERS)) {
classes.add(loadInitializerClass(className));
}
}
String localClassNames = servletContext.getInitParameter(CONTEXT_INITIALIZER_CLASSES_PARAM);
if (localClassNames != null) {
for (String className : StringUtils.tokenizeToStringArray(localClassNames, INIT_PARAM_DELIMITERS)) {
classes.add(loadInitializerClass(className));
}
}
return classes;
}
@ -534,14 +518,14 @@ public class ContextLoader {
* EJBs. For pure web applications, there is usually no need to worry about
* having a parent context to the root web application context.
* <p>The default implementation uses
* {@link com.fr.third.springframework.context.access.ContextSingletonBeanFactoryLocator},
* {@link ContextSingletonBeanFactoryLocator},
* configured via {@link #LOCATOR_FACTORY_SELECTOR_PARAM} and
* {@link #LOCATOR_FACTORY_KEY_PARAM}, to load a parent context
* which will be shared by all other users of ContextsingletonBeanFactoryLocator
* which also use the same configuration parameters.
* @param servletContext current servlet context
* @return the parent application context, or {@code null} if none
* @see com.fr.third.springframework.context.access.ContextSingletonBeanFactoryLocator
* @see ContextSingletonBeanFactoryLocator
*/
protected ApplicationContext loadParentContext(ServletContext servletContext) {
ApplicationContext parentContext = null;

Loading…
Cancel
Save