攔截器 Interceptor
Last updated
Was this helpful?
Last updated
Was this helpful?
實作 HandlerInterceptor 介面,實現 preHandle、postHandle 和 afterCompletion 方法。
通過配置加入攔截器,實現 WebMvcConfigurer 介面,覆寫 addInterceptors 方法。
ServletContextListener > Filter >
Interceptor > AOP > 具體執行的方法 > AOP > @ControllerAdvice > Interceptor
> Filter > ServletContextListener