spring拦截器用到aop的技术
两步:
<!--Rest鉴权-->
<mvc:interceptors>
<bean class="*.NeedRolesInterceptor" />
</mvc:interceptors>
public class NeedRolesInterceptor extends HandlerInterceptorAdapter
权限验证,重写preHandle方法
参考文档:
比较好的参考文档如下:
http://www.tuicool.com/articles/nQ3uEfq
http://www.iteye.com/problems/96540
http://zhidao.baidu.com/link?url=-7xbR65BtGqgDIVpl3jteXOTwr_7GDU9uJ60slNAkKiPff2HentT13qg99ZSqp4820AJGCPwj7FxXWEPHDwDSo0VFHIUy-rauUr-2_bs23O
http://blog.csdn.net/jdream314/article/details/18041391
http://cxh870510.blog.163.com/blog/static/4441908120107254337113/
原文:http://www.cnblogs.com/usual2013blog/p/4262283.html