Spring / Spring MVC Interview questions
Explain Spring MVC Interceptor.
HandlerInterceptor interface can be used in spring mvc application to pre-handle and post-handle web requests that are handled by Spring MVC controllers. These handlers are mostly used to manipulate the model attributes returned/submitted before it is passed to the views/controllers.
A handler interceptor can be registered for particular URL mappings so that it only intercepts requests mapped to certain URLs. Each handler interceptor must implement the HandlerInterceptor interface, which contains three callback methods for you to implement: preHandle(), postHandle() and afterCompletion().
More Related questions...