@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    @ConditionalOnMissingBean(name = "tomcatSessionInitializerFilter")
    public FilterRegistrationBean<SessionInitializerFilter> tomcatSessionInitializerFilter(
        final CasConfigurationProperties casProperties) {
        val bean = new FilterRegistrationBean();
        bean.setFilter(new SessionInitializerFilter());
        bean.setUrlPatterns(CollectionUtils.wrap("/*"));
        bean.setName("tomcatSessionInitializerFilter");
        bean.setAsyncSupported(true);
        bean.setEnabled(casProperties.getServer().getTomcat().getSessionInitialization().isEnabled());
        bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
        return bean;
    }
This is {@link CasEmbeddedContainerTomcatFiltersConfiguration}.

@author Misagh Moayyed
@since 5.0.0
webapp/cas-server-webapp-init-tomcat/src/main/java/org/apereo/cas/config/CasEmbeddedContainerTomcatFiltersConfiguration.java