这里写自定义目录标题
Sspringmvc拦截器interceptor不执行perHandle问题总结
1.检查Springmvc.xml配置文件中是否添加标签
<!-- path中的/代表当前路径,也就是需要在哪个controller中需要进行拦截,为了方便,现HandlerInterceptor实现类最好是与controller同级 -->
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/**"/>
<bean class="实现HandlerInterceptor类的类全路径">
</mvc:interceptor>
</mvc:interceptors>
注意事项
path中的/代表当前路径,也就是需要在哪个controller中需要进行拦截,为了方便,现HandlerInterceptor实现类最好是与controller同级