@ConditionalOnMissingBean(name = "registeredServiceViewResolver")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public ViewResolver registeredServiceViewResolver(
            @Qualifier("themeResolver") final ThemeResolver themeResolver,
            @Qualifier("themeViewResolverFactory") final ThemeViewResolverFactory themeViewResolverFactory) {
            val resolver = new ThemeBasedViewResolver(themeResolver, themeViewResolverFactory);
            resolver.setOrder(THYMELEAF_VIEW_RESOLVER_ORDER - 1);
            return resolver;
        }
This is {@link CasThymeleafAutoConfiguration}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-thymeleaf/src/main/java/org/apereo/cas/config/CasThymeleafAutoConfiguration.java