Servlet Filter and Spring interceptor and functionally similar, can be used for URL rules to go into processing
Order of execution for multiple servlet filter
The order is the order of the configuration of the filter mapping, and the order in which the filter is executed is the order of the filter mapping in Web. Xml.
Execution order of multiple spring interceptor
Spring Interceptor is also the order of execution, but interceptor one more configuration parameter order through which he can also implement interceptor execution order.
The Order of filter and Interceptor
The servlet filter is, of course, executed before the spring interceptor is executed.
Personal feeling Spring Interceptor function is powerful, filter can do things, he can do, and can be requested before, the request after execution, more flexible.
The difference is still a little bit
Filter is mainly for the URL to do a coding thing, filter out the useless parameters, security check (more general, such as login not login, etc.), too thin, or recommend the use of interceptor
Interceptor more, in addition to the above functions, but also to monitor the performance of debugging methods, in the page load, through the Posthandle method to put the common parameter values on some pages.
Servlet filter differs from spring interceptor functionality