use of org.springframework.web.filter.GenericFilterBean in project cloudbreak by hortonworks.
the class AppConfig method turnOnStackUnderOperationService.
@Bean
public FilterRegistrationBean turnOnStackUnderOperationService() {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(new GenericFilterBean() {
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
stackUnderOperationService.on();
chain.doFilter(request, response);
stackUnderOperationService.off();
}
});
registration.addUrlPatterns("/*");
return registration;
}
Aggregations