08-02-2023, 06:50 AM
[HandlerInterceptor][1]s in Spring can now be configured to be invoked only on certain URLs using `<mvc:interceptors>`.
Servlet Filters can achieve same functionality (logging, security etc). So which one should be used?
I think with Interceptors, one can use `ModelAndView` object to work with Models so it has more advantages. Can anyone draw out scenarios where Filters or Interceptors have advantages over the other?
[1]:
Servlet Filters can achieve same functionality (logging, security etc). So which one should be used?
I think with Interceptors, one can use `ModelAndView` object to work with Models so it has more advantages. Can anyone draw out scenarios where Filters or Interceptors have advantages over the other?
[1]:
[To see links please register here]