亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? servletcontextpropertyplaceholderconfigurer.java

?? spring framework 2.5.4源代碼
?? JAVA
字號:
/*
 * Copyright 2002-2005 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.web.context.support;

import java.util.Properties;

import javax.servlet.ServletContext;

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.web.context.ServletContextAware;

/**
 * Subclass of PropertyPlaceholderConfigurer that resolves placeholders as
 * ServletContext init parameters (that is, <code>web.xml</code> context-param
 * entries).
 *
 * <p>Can be combined with "locations" and/or "properties" values in addition
 * to web.xml context-params. Alternatively, can be defined without local
 * properties, to resolve all placeholders as <code>web.xml</code> context-params
 * (or JVM system properties).
 *
 * <p>If a placeholder could not be resolved against the provided local
 * properties within the application, this configurer will fall back to
 * ServletContext parameters. Can also be configured to let ServletContext
 * init parameters override local properties (contextOverride=true).
 *
 * <p>Optionally supports searching for ServletContext <i>attributes</i>: If turned
 * on, an otherwise unresolvable placeholder will matched against the corresponding
 * ServletContext attribute, using its stringified value if found. This can be
 * used to feed dynamic values into Spring's placeholder resolution.
 *
 * <p>If not running within a WebApplicationContext (or any other context that
 * is able to satisfy the ServletContextAware callback), this class will behave
 * like the default PropertyPlaceholderConfigurer. This allows for keeping
 * ServletContextPropertyPlaceholderConfigurer definitions in test suites.
 *
 * @author Juergen Hoeller
 * @since 1.1.4
 * @see #setLocations
 * @see #setProperties
 * @see #setSystemPropertiesModeName
 * @see #setContextOverride
 * @see #setSearchContextAttributes
 * @see javax.servlet.ServletContext#getInitParameter(String)
 * @see javax.servlet.ServletContext#getAttribute(String)
 */
public class ServletContextPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer
		implements ServletContextAware {

	private boolean contextOverride = false;

	private boolean searchContextAttributes = false;

	private ServletContext servletContext;


	/**
	 * Set whether ServletContext init parameters (and optionally also ServletContext
	 * attributes) should override local properties within the application.
	 * Default is "false": ServletContext settings serve as fallback.
	 * <p>Note that system properties will still override ServletContext settings,
	 * if the system properties mode is set to "SYSTEM_PROPERTIES_MODE_OVERRIDE".
	 * @see #setSearchContextAttributes
	 * @see #setSystemPropertiesModeName
	 * @see #SYSTEM_PROPERTIES_MODE_OVERRIDE
	 */
	public void setContextOverride(boolean contextOverride) {
		this.contextOverride = contextOverride;
	}

	/**
	 * Set whether to search for matching a ServletContext attribute before
	 * checking a ServletContext init parameter. Default is "false": only
	 * checking init parameters.
	 * <p>If turned on, the configurer will look for a ServletContext attribute with
	 * the same name as the placeholder, and use its stringified value if found.
	 * Exposure of such ServletContext attributes can be used to dynamically override
	 * init parameters defined in <code>web.xml</code>, for example in a custom
	 * context listener.
	 * @see javax.servlet.ServletContext#getInitParameter(String)
	 * @see javax.servlet.ServletContext#getAttribute(String)
	 */
	public void setSearchContextAttributes(boolean searchContextAttributes) {
		this.searchContextAttributes = searchContextAttributes;
	}

	/**
	 * Set the ServletContext to resolve placeholders against.
	 * Will be auto-populated when running in a WebApplicationContext.
	 * <p>If not set, this configurer will simply not resolve placeholders
	 * against the ServletContext: It will effectively behave like a plain
	 * PropertyPlaceholderConfigurer in such a scenario.
	 */
	public void setServletContext(ServletContext servletContext) {
		this.servletContext = servletContext;
	}


	protected String resolvePlaceholder(String placeholder, Properties props) {
		String value = null;
		if (this.contextOverride && this.servletContext != null) {
			value = resolvePlaceholder(placeholder, this.servletContext, this.searchContextAttributes);
		}
		if (value == null) {
			value = super.resolvePlaceholder(placeholder, props);
		}
		if (value == null && this.servletContext != null) {
			value = resolvePlaceholder(placeholder, this.servletContext, this.searchContextAttributes);
		}
		return value;
	}

	/**
	 * Resolves the given placeholder using the init parameters
	 * and optionally also the attributes of the given ServletContext.
	 * <p>Default implementation checks ServletContext attributes before
	 * init parameters. Can be overridden to customize this behavior,
	 * potentially also applying specific naming patterns for parameters
	 * and/or attributes (instead of using the exact placeholder name).
	 * @param placeholder the placeholder to resolve
	 * @param servletContext the ServletContext to check
	 * @param searchContextAttributes whether to search for a matching
	 * ServletContext attribute
	 * @return the resolved value, of null if none
	 * @see javax.servlet.ServletContext#getInitParameter(String)
	 * @see javax.servlet.ServletContext#getAttribute(String)
	 */
	protected String resolvePlaceholder(
			String placeholder, ServletContext servletContext, boolean searchContextAttributes) {

		String value = null;
		if (searchContextAttributes) {
			Object attrValue = servletContext.getAttribute(placeholder);
			if (attrValue != null) {
				value = attrValue.toString();
			}
		}
		if (value == null) {
			value = servletContext.getInitParameter(placeholder);
		}
		return value;
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩国产欧美一区二区三区| 亚洲制服丝袜av| 不卡视频免费播放| 亚洲日韩欧美一区二区在线| 欧美综合视频在线观看| 成人免费看黄yyy456| 日本aⅴ免费视频一区二区三区| 欧美成人性战久久| 91视频免费播放| 国产精品综合二区| 亚洲激情av在线| 久久久三级国产网站| 99久久精品99国产精品| 久久精品噜噜噜成人88aⅴ | 99re6这里只有精品视频在线观看| 亚洲人成在线观看一区二区| 精品福利一二区| 欧美一级日韩免费不卡| 久久精品国产一区二区三| 日韩**一区毛片| 韩国成人精品a∨在线观看| 亚洲精品视频在线| 欧美成人性战久久| 在线中文字幕一区二区| 国产一区美女在线| 久久精品国产亚洲高清剧情介绍 | 91色婷婷久久久久合中文| 午夜精品成人在线| 亚洲精品大片www| 亚洲一区二区在线免费看| 国产精品卡一卡二卡三| 国产精品久久久久aaaa樱花 | 亚洲成人第一页| 亚洲福利视频一区| 偷拍自拍另类欧美| 日韩国产一二三区| 蜜桃免费网站一区二区三区| 丝袜美腿一区二区三区| 日韩黄色小视频| 男人的天堂久久精品| 美洲天堂一区二卡三卡四卡视频| 麻豆传媒一区二区三区| 94色蜜桃网一区二区三区| 欧美亚一区二区| 欧美一区二区三区免费大片| 成人国产在线观看| 欧美精品一区二区高清在线观看| 日本色综合中文字幕| 日韩一二三区不卡| 亚洲男女一区二区三区| 日韩二区三区四区| 99久久精品免费精品国产| 日韩欧美国产综合| 亚洲第一成年网| aaa亚洲精品| 日韩欧美中文一区二区| 国产精品久久久久毛片软件| 午夜成人在线视频| 色婷婷综合久久久中文字幕| 日韩一区二区三区四区五区六区| 亚洲欧洲日产国码二区| 成人小视频在线观看| 亚洲欧美国产毛片在线| 麻豆一区二区三区| 日韩一级在线观看| 午夜视频久久久久久| 欧美日韩久久久| 亚洲综合色婷婷| 色悠悠久久综合| 伊人婷婷欧美激情| 99亚偷拍自图区亚洲| 中文字幕国产一区二区| 国产不卡在线视频| 久久久国产综合精品女国产盗摄| 国内精品写真在线观看| 精品国产污污免费网站入口 | 亚洲一区二区美女| 欧美日韩不卡一区| 国产乱码字幕精品高清av| 久久久久久久久免费| 91免费视频网址| 久久国产尿小便嘘嘘尿| 亚洲欧美日韩在线不卡| 欧美成人性福生活免费看| 日本道色综合久久| 日本三级亚洲精品| 国产精品乱码一区二区三区软件| 不卡一区中文字幕| 视频一区二区三区在线| 国产女人18毛片水真多成人如厕| 92精品国产成人观看免费| 毛片av一区二区| 一区二区在线免费观看| 久久精品在线观看| 欧美日韩成人综合| 成人性生交大片免费看中文| 青草av.久久免费一区| 亚洲男帅同性gay1069| 国产婷婷一区二区| 精品日韩一区二区三区免费视频| 日本道免费精品一区二区三区| 国产精品综合av一区二区国产馆| 久久精品72免费观看| 琪琪久久久久日韩精品| 亚洲福利一二三区| 亚洲mv在线观看| 视频在线在亚洲| 亚洲成人自拍偷拍| 亚洲成人av电影| 麻豆精品一区二区三区| 热久久一区二区| 蜜桃视频一区二区| 奇米精品一区二区三区在线观看 | 蜜臀91精品一区二区三区| 日本美女一区二区| 蜜臀久久久久久久| 美女任你摸久久| 国产又粗又猛又爽又黄91精品| 久久国内精品自在自线400部| 日韩 欧美一区二区三区| 视频一区中文字幕国产| 玖玖九九国产精品| 欧美三级视频在线观看| 在线视频你懂得一区| 日韩欧美亚洲另类制服综合在线| 欧美成人综合网站| 亚洲人成网站精品片在线观看| 最新成人av在线| 蜜桃av噜噜一区| 99国产麻豆精品| 日韩三级视频在线看| 欧美经典一区二区三区| 亚洲精品视频在线| 国内精品久久久久影院色| av在线不卡网| 欧美精品一区男女天堂| 亚洲动漫第一页| 国产成人免费av在线| 欧美在线一区二区| 国产午夜一区二区三区| 亚洲自拍偷拍网站| 丁香婷婷综合网| 91精品国产入口| 亚洲成人免费观看| 91论坛在线播放| 国产精品三级电影| 国产激情视频一区二区在线观看| 在线亚洲人成电影网站色www| 国产亚洲欧美一级| 国产麻豆成人精品| 日韩精品中文字幕在线一区| 亚洲国产日韩a在线播放| 99国产精品一区| 亚洲四区在线观看| 91日韩精品一区| 亚洲成在线观看| 在线成人免费视频| 日韩av午夜在线观看| 制服丝袜亚洲网站| 久久99久久久久久久久久久| 欧美一卡2卡3卡4卡| 国产麻豆9l精品三级站| 亚洲色图一区二区三区| 91网上在线视频| 视频一区二区中文字幕| 久久久久亚洲蜜桃| 懂色av一区二区三区蜜臀| 亚洲色图19p| 国产精品国产三级国产专播品爱网 | 成人av电影在线观看| 一区二区三区久久| 欧美电影免费观看高清完整版在| 国产精品一区专区| 一区二区日韩电影| 精品美女在线观看| 99精品久久久久久| 国产综合成人久久大片91| 成人免费在线视频观看| 日韩午夜激情av| 91久久精品一区二区三区| 国产最新精品精品你懂的| 一区二区三区在线视频播放| 日韩精品一区二区三区中文不卡| 99国内精品久久| 国产成人免费在线观看| 裸体一区二区三区| 亚洲成a人片在线不卡一二三区| 久久综合久久综合久久| 欧美一区二区三区在线观看视频| av成人免费在线观看| 成人一级黄色片| 国产精品一区在线| 国产一区在线精品| 久久99精品国产.久久久久久| 一区二区三区日韩欧美精品| 国产精品国产a| 亚洲视频一区在线| 亚洲免费观看高清在线观看| 日韩一区在线免费观看| 亚洲欧美偷拍三级|