- 博客(1)
- 收藏
- 关注
原创 SpringBoot -- Interceptor拦截器如何配置&生效
新建一个LoginInterceptor拦截器实现implements HandlerInterceptor,导入spring-boot- starter-web,复写HandlerInterceptor里面的preHandle方法。排除路径 -- excludePathPatterns("js/**") 排除静态资源路径。然后可以addPathPatterns,过滤所有请求("/**")
2023-08-11 19:31:05
532
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人