简体   繁体   中英

Spring interceptor vs servlet filter

Spring拦截器比servlet过滤器有什么优势?

  • You can inject other beans in the interceptor
  • You can use more advanced mapping patterns (ant-style)
  • You have the target handler object (controller) available, as well as the result ModelAndView
  • It is a bean, so you can use AOP with it (althoug that would be rare)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM