@Configuration
public class FilterRegisterConfig {@Beanpublic FilterRegistrationBean<SecurityFilter> securityFilter(){FilterRegistrationBean<SecurityFilter> re = new FilterRegistrationBean<>();re.setFilter(new SecurityFilter());re.addUrlPatterns("/*");Map<String, String> initParams = new HashMap();initParams.put("requestsuffix", "");//登录地址initParams.put("loginUrl", "");re.setInitParameters(initParams);return re;}
}