How to create a Spring Interceptor for Spring RESTful web services

Following steps can be taken to implement the interceptor with Spring: Implement an interceptor class extending HandlerInterceptorAdapter class. Following is how the code could look like: public class LoginInterceptor extends HandlerInterceptorAdapter { @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception exception) throws Exception { // TODO Auto-generated method stub } @Override public void … Read more

tech