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

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

?? autowiringtilesrequestprocessor.java

?? spring framework 2.5.4源代碼
?? JAVA
字號:
/*
 * Copyright 2002-2006 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.struts;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.config.ModuleConfig;
import org.apache.struts.tiles.TilesRequestProcessor;

import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.context.WebApplicationContext;

/**
 * Subclass of Struts's TilesRequestProcessor that autowires Struts Actions
 * with Spring beans defined in ContextLoaderPlugIn's WebApplicationContext
 * or - in case of general service layer beans - in the root WebApplicationContext.
 *
 * <p>Behaves like
 * {@link AutowiringRequestProcessor AutowiringRequestProcessor},
 * but also provides the Tiles functionality of the original TilesRequestProcessor.
 * As there's just a single central class to customize in Struts, we have to provide
 * another subclass here, covering both the Tiles and the Spring delegation aspect.
 *
 * <p>The default implementation delegates to the DelegatingActionUtils
 * class as fas as possible, to reuse as much code as possible despite
 * the need to provide two RequestProcessor subclasses. If you need to
 * subclass yet another RequestProcessor, take this class as a template,
 * delegating to DelegatingActionUtils just like it.
 *
 * @author Juergen Hoeller
 * @since 2.0
 * @see AutowiringRequestProcessor
 * @see ContextLoaderPlugIn
 * @see DelegatingActionUtils
 */
public class AutowiringTilesRequestProcessor extends TilesRequestProcessor {

	private WebApplicationContext webApplicationContext;

	private int autowireMode = AutowireCapableBeanFactory.AUTOWIRE_NO;

	private boolean dependencyCheck = false;


	public void init(ActionServlet actionServlet, ModuleConfig moduleConfig) throws ServletException {
		super.init(actionServlet, moduleConfig);
		if (actionServlet != null) {
			this.webApplicationContext = initWebApplicationContext(actionServlet, moduleConfig);
			this.autowireMode = initAutowireMode(actionServlet, moduleConfig);
			this.dependencyCheck = initDependencyCheck(actionServlet, moduleConfig);
		}
	}

	/**
	 * Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext,
	 * falling back to the root WebApplicationContext. This context is supposed
	 * to contain the service layer beans to wire the Struts Actions with.
	 * @param actionServlet the associated ActionServlet
	 * @param moduleConfig the associated ModuleConfig
	 * @return the WebApplicationContext
	 * @throws IllegalStateException if no WebApplicationContext could be found
	 * @see DelegatingActionUtils#findRequiredWebApplicationContext
	 * @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX
	 */
	protected WebApplicationContext initWebApplicationContext(
			ActionServlet actionServlet, ModuleConfig moduleConfig) throws IllegalStateException {

		WebApplicationContext wac =
				DelegatingActionUtils.findRequiredWebApplicationContext(actionServlet, moduleConfig);
		if (wac instanceof ConfigurableApplicationContext) {
			((ConfigurableApplicationContext) wac).getBeanFactory().ignoreDependencyType(ActionServlet.class);
		}
		return wac;
	}

	/**
	 * Determine the autowire mode to use for wiring Struts Actions.
	 * <p>The default implementation checks the "autowire" init-param of the
	 * Struts ActionServlet, falling back to "AUTOWIRE_BY_TYPE" as default.
	 * @param actionServlet the associated ActionServlet
	 * @param moduleConfig the associated ModuleConfig
	 * @return the autowire mode to use
	 * @see DelegatingActionUtils#getAutowireMode
	 * @see org.springframework.beans.factory.config.AutowireCapableBeanFactory#autowireBeanProperties
	 * @see org.springframework.beans.factory.config.AutowireCapableBeanFactory#AUTOWIRE_BY_TYPE
	 * @see org.springframework.beans.factory.config.AutowireCapableBeanFactory#AUTOWIRE_BY_NAME
	 */
	protected int initAutowireMode(ActionServlet actionServlet, ModuleConfig moduleConfig) {
		return DelegatingActionUtils.getAutowireMode(actionServlet);
	}

	/**
	 * Determine whether to apply a dependency check after wiring Struts Actions.
	 * <p>The default implementation checks the "dependencyCheck" init-param of the
	 * Struts ActionServlet, falling back to no dependency check as default.
	 * @param actionServlet the associated ActionServlet
	 * @param moduleConfig the associated ModuleConfig
	 * @return whether to enforce a dependency check or not
	 * @see DelegatingActionUtils#getDependencyCheck
	 * @see org.springframework.beans.factory.config.AutowireCapableBeanFactory#autowireBeanProperties
	 */
	protected boolean initDependencyCheck(ActionServlet actionServlet, ModuleConfig moduleConfig) {
		return DelegatingActionUtils.getDependencyCheck(actionServlet);
	}


	/**
	 * Return the current Spring WebApplicationContext.
	 */
	protected final WebApplicationContext getWebApplicationContext() {
		return this.webApplicationContext;
	}

	/**
	 * Return the autowire mode to use for wiring Struts Actions.
	 */
	protected final int getAutowireMode() {
		return autowireMode;
	}

	/**
	 * Return whether to apply a dependency check after wiring Struts Actions.
	 */
	protected final boolean getDependencyCheck() {
		return dependencyCheck;
	}


	/**
	 * Extend the base class method to autowire each created Action instance.
	 * @see org.springframework.beans.factory.config.AutowireCapableBeanFactory#autowireBeanProperties
	 */
	protected Action processActionCreate(
			HttpServletRequest request, HttpServletResponse response, ActionMapping mapping)
			throws IOException {

		Action action = super.processActionCreate(request, response, mapping);
		getWebApplicationContext().getAutowireCapableBeanFactory().autowireBeanProperties(
				action, getAutowireMode(), getDependencyCheck());
		return action;
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人不卡免费av| 久久电影国产免费久久电影 | 成人美女在线观看| 久久激情五月婷婷| 麻豆一区二区99久久久久| 免费看日韩精品| 国产一区福利在线| 成人av在线一区二区三区| 成人午夜av影视| 91网站视频在线观看| 色综合久久88色综合天天6| 色噜噜狠狠一区二区三区果冻| 91亚洲国产成人精品一区二区三| 日本道在线观看一区二区| 欧美最新大片在线看| 欧美日本一区二区三区| 日韩欧美中文字幕公布| 久久精品欧美日韩精品| 中文字幕欧美一| 亚洲影视在线播放| 蜜臀av性久久久久蜜臀aⅴ流畅| 狠狠v欧美v日韩v亚洲ⅴ| 成人一区二区三区视频在线观看| 成人福利视频网站| 欧美日韩一区不卡| 精品国产免费久久| 中文字幕一区二区5566日韩| 婷婷国产在线综合| 美女视频免费一区| eeuss国产一区二区三区| 欧美日韩三级在线| 国产亚洲一区二区在线观看| 亚洲欧洲国产专区| 亚洲在线中文字幕| 久久99这里只有精品| 9久草视频在线视频精品| 91麻豆精品国产无毒不卡在线观看 | 国产乱码精品一区二区三区av| 国产大陆亚洲精品国产| 欧美日韩在线播放一区| 久久久亚洲精品一区二区三区| 亚洲国产一区二区三区青草影视| 精品一区二区三区在线播放| 国产精品99久久久久久久vr| 亚洲国产日韩精品| 国产suv精品一区二区三区| 欧美日本在线播放| 日本午夜一本久久久综合| 欧美日韩国产一级片| 色综合久久99| 欧美日韩国产首页| 99热在这里有精品免费| 在线免费观看一区| 91看片淫黄大片一级在线观看| 99久久精品久久久久久清纯| 色婷婷精品大视频在线蜜桃视频| 久久久久国产一区二区三区四区| 午夜精品久久久久久久久| 亚洲国产一二三| 国产在线精品一区二区三区不卡| 国产一本一道久久香蕉| 日本道色综合久久| 欧洲另类一二三四区| 91美女视频网站| 欧美精品久久99久久在免费线| 日韩一级大片在线观看| 日韩一区二区免费电影| 99久久精品国产导航| 欧洲另类一二三四区| 亚洲午夜免费视频| 国产精品1区2区| 中文无字幕一区二区三区 | 欧美久久久久中文字幕| 欧美一二三四区在线| 久久久国产午夜精品| 亚洲综合一区二区| 日韩av在线发布| 成人精品高清在线| 人人狠狠综合久久亚洲| 久久综合九色综合久久久精品综合| 国产欧美日韩视频在线观看| 一区二区三区四区不卡在线 | 中文字幕在线一区| 大白屁股一区二区视频| 国产视频一区在线观看| 懂色av中文一区二区三区| 国产精品丝袜黑色高跟| 成人激情开心网| 久久伊人蜜桃av一区二区| 日本美女视频一区二区| 激情久久久久久久久久久久久久久久| 91福利资源站| 日本成人在线不卡视频| 日韩三级.com| 男人的天堂久久精品| 国产福利一区二区三区| 国产精品美女一区二区| 韩国精品免费视频| 精品福利一二区| 亚洲午夜久久久| 亚洲一区中文在线| 正在播放亚洲一区| 一区二区三区日韩欧美| 国产三级一区二区| 亚洲图片你懂的| 久久久久久久性| 精品视频免费看| 麻豆精品在线视频| jlzzjlzz欧美大全| 国产精品 日产精品 欧美精品| 欧美色中文字幕| 国产精品自拍av| 午夜久久电影网| 国产偷v国产偷v亚洲高清| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 蜜臀a∨国产成人精品| 东方aⅴ免费观看久久av| 午夜欧美大尺度福利影院在线看| 日本欧洲一区二区| 三级在线观看一区二区| 亚洲综合成人在线视频| 国产精品久久久久桃色tv| 亚洲欧洲性图库| 色94色欧美sute亚洲线路一ni| 亚洲精品国产精华液| 在线一区二区视频| 日韩网站在线看片你懂的| 国产成人精品1024| 制服丝袜激情欧洲亚洲| 国产精品99久| 日韩av中文字幕一区二区三区| 男女男精品视频网| 日韩高清一区二区| 成+人+亚洲+综合天堂| 51精品视频一区二区三区| 亚洲黄色在线视频| 国产一区二区福利| 亚洲免费电影在线| av电影天堂一区二区在线| 色一情一乱一乱一91av| 久久er99精品| 久久精品男人的天堂| 日韩成人精品在线观看| 久久婷婷一区二区三区| 久久久久99精品国产片| 亚洲在线视频网站| 亚洲一区二区3| 国产精品三级av| 久久99国产精品久久| 国产激情91久久精品导航| 色美美综合视频| 亚洲欧洲精品一区二区精品久久久 | 日韩在线a电影| 国产精品乱人伦| 蜜臀av性久久久久蜜臀aⅴ流畅| 日本aⅴ免费视频一区二区三区| 亚洲成a人在线观看| 欧美v日韩v国产v| 日韩一区二区三区免费看| 日韩欧美在线影院| 亚洲一区二区中文在线| 精品一区二区免费在线观看| 91片黄在线观看| 懂色av中文一区二区三区 | 国内精品写真在线观看| 国产suv精品一区二区6| 亚洲免费视频中文字幕| 久久精品国产99国产精品| 中文字幕亚洲一区二区va在线| 3d成人h动漫网站入口| av午夜精品一区二区三区| 天天射综合影视| 欧美精品1区2区| 亚洲成人动漫精品| 91丨九色porny丨蝌蚪| 精品成人私密视频| 成人激情黄色小说| 中文字幕不卡在线播放| 制服丝袜亚洲网站| 欧美高清视频一二三区 | 一本高清dvd不卡在线观看| 91.com在线观看| 丁香六月综合激情| 欧美性猛交xxxxxx富婆| 欧美激情中文不卡| 久久影院电视剧免费观看| 爽好多水快深点欧美视频| 欧美麻豆精品久久久久久| 在线播放国产精品二区一二区四区| 亚洲第一久久影院| 日韩电影在线免费看| 国产在线国偷精品产拍免费yy| 97久久久精品综合88久久| 538在线一区二区精品国产| 日本一区二区免费在线观看视频| 午夜精品久久久久影视| 国产盗摄一区二区三区| 91免费观看视频| 欧美成人bangbros| 亚洲国产精品一区二区久久恐怖片 |