private void configureTemplateThemeDefaultLocation(final AbstractThymeleafView thymeleafView) {
        val baseTemplateName = thymeleafView.getTemplateName();
        val templateName = theme + '/' + baseTemplateName;
        val path = thymeleafProperties.getPrefix().concat(templateName).concat(thymeleafProperties.getSuffix());
        LOGGER.trace("Attempting to locate theme location at [{}]", path);
        val location = new TemplateLocation(path);
        val applicationContext = getApplicationContext();
        if (applicationContext != null && location.exists(applicationContext)) {
            thymeleafView.setTemplateName(templateName);
        }
    }
{@link ThemeViewResolverFactory} that will
create a {@link ThemeViewResolver} for the specified theme.
support/cas-server-support-thymeleaf-core/src/main/java/org/apereo/cas/services/web/ThemeViewResolver.java