List of usage examples for org.springframework.web.servlet.config.annotation InterceptorRegistry addWebRequestInterceptor
public InterceptorRegistration addWebRequestInterceptor(WebRequestInterceptor interceptor)
From source file:org.neo4j.cineasts.Application.java
@Override public void addInterceptors(InterceptorRegistry registry) { registry.addWebRequestInterceptor(openSessionInViewInterceptor()); }
From source file:com.example.CommonModelConfiguration.java
@Override public void addInterceptors(InterceptorRegistry registry) { registry.addWebRequestInterceptor(interceptor()); }
From source file:ca.weblite.contacts.webservice.RESTServiceConfiguration.java
@Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new HandlerInterceptorAdapter() { @Override//from w w w . j av a 2s . com public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { System.out.println("About to handle request"); response.getWriter().write("In handler"); return super.preHandle(request, response, handler); //To change body of generated methods, choose Tools | Templates. } }); registry.addWebRequestInterceptor(new WebRequestInterceptor() { public void preHandle(WebRequest wr) throws Exception { System.out.println("About to handle web request"); } public void postHandle(WebRequest wr, ModelMap mm) throws Exception { } public void afterCompletion(WebRequest wr, Exception excptn) throws Exception { } }); super.addInterceptors(registry); //To change body of generated methods, choose Tools | Templates. }