首页 > 其他 > 详细

拦截器配置

时间:2017-10-10 20:17:00      阅读:219      评论:0      收藏:0      [点我收藏+]
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>

 

拦截器配置

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!