title: Difference between Interceptor and Filter in Spring MVC
body: <p>I'm a little bit confused about <code>Filter</code> and <code>Interceptor</code> purposes. </p>
  
  <p>As I understood from docs, <code>Interceptor</code> is run between requests. On the other hand <code>Filter</code> is run before rendering view, but after Controller rendered response. </p>
  
  <p>So where is the difference between <code>postHandle()</code> in Interceptor and <code>doFilter()</code> in Filter? </p>
  
  <p><a href="https://i.stack.imgur.com/1SMRk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1SMRk.png" alt="Spring MVC sheme"></a>
  What is the best practise in which use cases it should be used?
  In this picture where works <code>Filter</code>s and <code>Interceptor</code>s?</p>