Google News
logo
Java Spring MVC - Interview Questions
Advantage of using HandlerInterceptorAdapter in Spring MVC framework.
Implementing HandlerInterceptor interface forces to implement all the three methods preHandle(), postHandle() and afterCompletion() irrespective of whether it is needed or not. To avoid that, you can use HandlerInterceptorAdapter class that implements HandlerInterceptor and provides default empty implementations. Extending HandlerInterceptorAdapter class allows you to override only the method that are required.
Advertisement