Chapter 6, Internalize Your Store with Interceptor

Questions

Answers

Consider the following interceptor:

public class SecurityInterceptor extends   HandlerInterceptorAdapter{    
    
   @Override    
   public void afterCompletion(HttpServletRequest   request,   HttpServletResponse response, Object handler, Exception ex)     throws Exception {    
         // just some code related to after completion    
   }    
}    

Is this SecurityInterceptor class a valid interceptor?

2. It is valid because it extends the HandlerInterceptorAdapter class.

Within the interceptor methods, what is the order of execution?

2. preHandle, postHandle, afterCompletion.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.67.203