天天看点

自定义我的拦截器

1.工程视图

自定义我的拦截器
package com.ask.intercept;
 import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
 public class MyIntercept  extends AbstractInterceptor{
     @Override
     public String intercept(ActionInvocation actioninvocation) throws Exception {
         System.out.println("beging  myInterceptor");
         String result=actioninvocation.invoke();
         System.out.println("end  myInterceptor");
         return result;
     }
    
 }      

继续阅读