过滤器和监听器都属于Servlet 的api,还可以使用 Spring 提供的拦截器(HandlerInterceptor)进行改更精细的控制。

Spring Boot整合拦截器

Spring Boot整合拦截器

Spring Boot整合拦截器

 

相关文章: