MethodFilterInterceptor(方法拦截器)配置excludeMethors

由于该类有setExcludeMethods方法,因此在xml中可以配置一个excludeMethods参数

刚开始老是拦截不成功,tomcat显示这个参数没找到,后来终于找到错误:不应该在拦截器栈中配置,而应该在拦截器中配置

XML:

<interceptor-ref name="myinter">
    <param name="excludeMethods">del</param>
</interceptor-ref>

其中myinter不能是拦截器栈,而应该是拦截器

原文地址:https://www.cnblogs.com/lanhj/p/3312645.html