⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 beforeresultinterceptor.java

📁 工厂版本管理系统,STRUTS2框架,用于管理商品的版本,便于有效的控制版本
💻 JAVA
字号:
package com.bluesky.web.struts2.interceptor;import com.opensymphony.xwork2.Action;import com.opensymphony.xwork2.ActionInvocation;import com.opensymphony.xwork2.interceptor.AbstractInterceptor;import com.opensymphony.xwork2.interceptor.PreResultListener;/* * this is a AFTER intercepter, just like the Preparable interceptor. */public class BeforeResultInterceptor extends AbstractInterceptor {    /**	 * 	 */	private static final long serialVersionUID = 1L;	public String intercept(ActionInvocation invocation) throws Exception {       Action action = (Action)invocation.getAction();              if (action instanceof PreResultListener) {    	       	   PreResultListener listener = (PreResultListener) action;    	       	   invocation.addPreResultListener(listener);    	          }              String resultCode = invocation.invoke();       return resultCode;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -