From b7f2ae02db5f6103d50e86f07d21abd78168c2c6 Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 9 Jul 2019 22:19:54 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-18472=20spring=E9=9B=86=E6=88=9010.0?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20=E6=88=91=E4=BB=AC=E7=9A=84ContextLoader?= =?UTF-8?q?=E6=89=AB=E5=88=B0=E4=BA=86=E5=AE=A2=E6=88=B7=E7=9A=84web.xml?= =?UTF-8?q?=E9=87=8C=E9=9D=A2=E7=9A=84spring=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/context/ContextLoader.java | 40 ++++++------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/fine-spring/src/com/fr/third/springframework/web/context/ContextLoader.java b/fine-spring/src/com/fr/third/springframework/web/context/ContextLoader.java index 9401e8580..6fb0d11ea 100644 --- a/fine-spring/src/com/fr/third/springframework/web/context/ContextLoader.java +++ b/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>> classes = new ArrayList>>(); - 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. *

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;