package com.dcit.authority.config;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ServletRequestConfiguration {
	
	@SuppressWarnings("unchecked")
    @Bean
    public FilterRegistrationBean requestFilter() {
        
        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
        registrationBean.setFilter(new RepeatlyReadFilter());
		registrationBean.addUrlPatterns("/*");
		registrationBean.setName("repeatlyReadFilter");
		return registrationBean;

    }

}
