@Override
    protected ITemplateResource computeTemplateResource(final IEngineConfiguration configuration,
                                                        final String ownerTemplate,
                                                        final String template,
                                                        final String resourceName,
                                                        final String characterEncoding,
                                                        final Map<String, Object> templateResolutionAttributes) {
        return this.resolvers
            .stream()
            .map(r -> r.resolveTemplate(configuration, ownerTemplate, template, templateResolutionAttributes))
            .filter(resource -> resource != null && resource.isTemplateResourceExistenceVerified())
            .findFirst()
            .map(TemplateResolution::getTemplateResource)
            .orElse(null);
    }
Initialize and sort resolvers here before computing templates.
support/cas-server-support-thymeleaf-core/src/main/java/org/apereo/cas/web/view/ChainingTemplateViewResolver.java