package cn.com.capcloud.core.system.acl;

/**
 * @author: wangyinfeng
 * @create: 2022/1/6
 */

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

import javax.servlet.DispatcherType;

@Configuration
public class ParamsFilterConfig {
    //paramsFilter被重复注册，在@WebFilter注解注册了，这里的注册是重复的，二者保留一个即可，在SpringBoot2.7重复注册不影响启动，但在SpringBoot3.5是不允许的,暂时先注释此段代码
    /*@Bean
    public FilterRegistrationBean paramsFilterRegistration() {
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setDispatcherTypes(DispatcherType.REQUEST);
        registration.setFilter(new ParamsFilter());
        registration.addUrlPatterns("/*");
        registration.setName("paramsFilter");
        registration.setOrder(Integer.MAX_VALUE-1);
        return registration;
    }*/
}
