From the course: Spring: Spring MVC

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Register interceptors

Register interceptors

From the course: Spring: Spring MVC

Start my 1-month free trial

Register interceptors

- [Instructor] In addition to giving a logic for the pre handle that we have already done in the previous video, you can also provide an implementation for the post handle method. So, if you see, this method comes in with request response objects as well and additionally has a ModelAndView as a method parameter. So, this is what I was saying is a part of post processing logic. If you want to enhance the model data that you're trying to display on your GSPs, you can grab this object here, provide that as a logic of your post processing, and then carry the response back to the client. Right now, I'm just going to put this as out. I do not need to do that right now. So, I'm just going to say post handle. Okay, what is the next step? The next step is adding the interceptor to registry in the configuration class. Yes, so since this is a custom interceptor that we have made, we have to make Spring aware of it, and that…

Contents