springmvc以及springboot中的拦截器配置

拦截器两种实现

   如果不同的controller中都需要拦截器,不能使用相同的拦截器,因为拦截器不能跨controller,这个时候只能为不同的controller配置不同的拦截器,每一个拦截器只能拦截每个不同的Controller。

1 继承 HandlerInterceptorAdapter

https://blog.csdn.net/zhuixundenvhanzhi/article/details/80304377

2 实现接口 HandlerInterceptor

https://www.cnblogs.com/liu1275271818/p/11502382.html

springboot中的拦截器配置

https://www.cnblogs.com/collin/articles/9928030.html

https://blog.csdn.net/qq_27293643/article/details/89214224

拦截器和过滤器的区别

https://www.cnblogs.com/linjiaxin/p/6113157.html

https://blog.csdn.net/testcs_dn/article/details/80279578

原文地址:https://www.cnblogs.com/wq-9/p/12047837.html