Spring Interceptors | Configure HandlerInterceptors | Explanation with Example

preview_player
Показать описание
Spring Interceptor are used to intercept client requests and process them.

HandlerInterceptor is basically similar to a Servlet Filter, but in contrast to the latter it just allows custom pre-processing with the option of prohibiting the execution of the handler itself, and custom post-processing. Provides us with three pre-define methods -

* preHandle() This method is used to perform some action on requests sent to the controller.
* postHandle() This method is used to perform some action on responses sent to the client.
* afterCompletion() This method is used to perform actions after request and response.

#springboot #java #spring
Рекомендации по теме
Комментарии
Автор

Bro share your notes on java, spring, spring boot, spring security, microservices, etc...
Have you prepared these notes for any course? Also there are no videos related to notes on your channel...

simon
Автор

How can I use a Autowired service inside preHandle?

VitoLipari-hq
Автор

Hii Prashant thia video is very helpful. How can i modify request body, responseBody in interceptor replace modified data?

three_bachelors
Автор

Why have you declared serialVersionUID in the exception class?

sudosai
Автор

where can we find notes which are u using

pradeepmahadik