@Bean
    @ConditionalOnMissingBean(name = "tenantRoutingFilter")
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public FilterRegistrationBean<TenantRoutingFilter> tenantRoutingFilter(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier(TenantExtractor.BEAN_NAME)
        final TenantExtractor tenantExtractor) {
        val fr = new FilterRegistrationBean<TenantRoutingFilter>();
        fr.setFilter(new TenantRoutingFilter(tenantExtractor));
        fr.addUrlPatterns("/*");
        fr.setOrder(Ordered.HIGHEST_PRECEDENCE + 2);
        fr.setAsyncSupported(true);
        fr.setName("tenantRoutingFilter");
        fr.setEnabled(CONDITION.given(applicationContext).get());
        return fr;
    }
This is {@link CasCoreMultitenancyAutoConfiguration}.

@author Misagh Moayyed
@since 7.2.0
core/cas-server-core-multitenancy/src/main/java/org/apereo/cas/config/CasCoreMultitenancyAutoConfiguration.java