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

📄 myinterceptor.java

📁 利用struts2的验证框架
💻 JAVA
字号:
package com.test.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class MyInterceptor implements Interceptor {
	
	public String hello;
	public void setHello(String hello) {
		this.hello = hello;
	}

	public void destroy() {
		System.out.println("destroy()...");
	}

	public void init() {
		System.out.println("init()...");
		System.out.println(hello);
	}

	public String intercept(ActionInvocation invocation) throws Exception {
		
		System.out.println("intercept()...");
		
		String result = invocation.invoke();
		
		return result;
	}

}

⌨️ 快捷键说明

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