码迷,mamicode.com
首页 > 其他好文 > 详细

拦截器配置

时间:2017-10-10 20:33:43      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:int   ati   配置   span   tee   des   public   区别   class   

1 // 实现Interceptor接口 或 实现 AbstractInterceptor类
2 //AbstractInterceptor 实现了Interceptor接口 主要区别在于空实现了init()、//destory()  方法,由于此方法一般不使用,所以避免了不必要的开销。
3 // 一般选择使用继承 AbstractInterceptor来创建拦截器
4 public abstract class AbstractInterceptor{
5 public void init(){}
6 public void destory(){}
7 public abstract String intercept(ActionInvocation invocation) throw Exception;
8 }

 

<intercepteer name="intercepter" class=interceptionClass"">
<param name="paramName">paramValue</param>

</intercepter>

 

拦截器配置

标签:int   ati   配置   span   tee   des   public   区别   class   

原文地址:http://www.cnblogs.com/the-wang/p/7647166.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!