81,094
社区成员
发帖
与我相关
我的任务
分享
package com.test.interceptor;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
public class MyInterceptor implements Interceptor {
private String hello;
public String getHello() {
return hello;
}
public void setHello(String hello) {
this.hello = hello;
}
public void destroy() {
System.out.println("destroy");
}
public void init() {
System.out.println(hello);
System.out.println("init");
}
public String intercept(ActionInvocation invocation) throws Exception {
System.out.println("intercept");
String result = invocation.invoke();
return result;
}
}