Search in sources :

Example 11 with StringTemplateResolver

use of org.thymeleaf.templateresolver.StringTemplateResolver in project zhcet-web by zhcet-amu.

the class TemplateConfig method stringTemplateResolver.

private ITemplateResolver stringTemplateResolver() {
    final StringTemplateResolver templateResolver = new StringTemplateResolver();
    templateResolver.setOrder(4);
    // No resolvable pattern, will simply process as a String template everything not previously matched
    templateResolver.setTemplateMode(TemplateMode.HTML);
    templateResolver.setCacheable(thymeleafProperties.isCache());
    return templateResolver;
}
Also used : StringTemplateResolver(org.thymeleaf.templateresolver.StringTemplateResolver)

Aggregations

StringTemplateResolver (org.thymeleaf.templateresolver.StringTemplateResolver)11 Context (org.thymeleaf.context.Context)7 Test (org.junit.Test)6 SpringTemplateEngine (org.thymeleaf.spring5.SpringTemplateEngine)6 TemplateEngine (org.thymeleaf.TemplateEngine)5 DefaultTemplateResolver (org.thymeleaf.templateresolver.DefaultTemplateResolver)2 ITemplateResolver (org.thymeleaf.templateresolver.ITemplateResolver)2 StringWriter (java.io.StringWriter)1 LinkedHashSet (java.util.LinkedHashSet)1 PostConstruct (javax.annotation.PostConstruct)1