---
description: Describe about Filter and Interceptor in Spring boot
---

# Filter vs Interceptor

<figure><img src="https://www.baeldung.com/wp-content/uploads/2021/05/filters_vs_interceptors.jpg" alt=""><figcaption><p>Reference from : <a href="https://www.baeldung.com/wp-content/uploads/2021/05/filters_vs_interceptors.jpg">https://www.baeldung.com/wp-content/uploads/2021/05/filters_vs_interceptors.jpg</a></p></figcaption></figure>

From this image , Filter isn't a part of Spring framework. It mainpulates request and response. It can block the request from client and also block response before reach client.

Interceptor is similar to **Filter** but it will intercept request between **Dispatcher Servlet** and **Controller**   &#x20;

**Use Case Filter**

* Authentication
* Logging and auditing

**Use Case Interceptor**

* Detailed authorization checks
* Manipulating the Spring context or model



