Search in sources :

Example 21 with ClassLoaderTemplateResolver

use of org.thymeleaf.templateresolver.ClassLoaderTemplateResolver in project tutorials by eugenp.

the class ThymeleafConfiguration method emailTemplateResolver.

@Bean
@Description("Thymeleaf template resolver serving HTML 5 emails")
public ClassLoaderTemplateResolver emailTemplateResolver() {
    ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver();
    emailTemplateResolver.setPrefix("mails/");
    emailTemplateResolver.setSuffix(".html");
    emailTemplateResolver.setTemplateMode("HTML5");
    emailTemplateResolver.setCharacterEncoding(CharEncoding.UTF_8);
    emailTemplateResolver.setOrder(1);
    return emailTemplateResolver;
}
Also used : ClassLoaderTemplateResolver(org.thymeleaf.templateresolver.ClassLoaderTemplateResolver)

Example 22 with ClassLoaderTemplateResolver

use of org.thymeleaf.templateresolver.ClassLoaderTemplateResolver in project tutorials by eugenp.

the class ThymeleafConfiguration method emailTemplateResolver.

@Bean
@Description("Thymeleaf template resolver serving HTML 5 emails")
public ClassLoaderTemplateResolver emailTemplateResolver() {
    ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver();
    emailTemplateResolver.setPrefix("mails/");
    emailTemplateResolver.setSuffix(".html");
    emailTemplateResolver.setTemplateMode("HTML5");
    emailTemplateResolver.setCharacterEncoding(CharEncoding.UTF_8);
    emailTemplateResolver.setOrder(1);
    return emailTemplateResolver;
}
Also used : ClassLoaderTemplateResolver(org.thymeleaf.templateresolver.ClassLoaderTemplateResolver)

Example 23 with ClassLoaderTemplateResolver

use of org.thymeleaf.templateresolver.ClassLoaderTemplateResolver in project hello-world by haoziapple.

the class ThymeleafConfiguration method emailTemplateResolver.

@Bean
@Description("Thymeleaf template resolver serving HTML 5 emails")
public ClassLoaderTemplateResolver emailTemplateResolver() {
    ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver();
    emailTemplateResolver.setPrefix("mails/");
    emailTemplateResolver.setSuffix(".html");
    emailTemplateResolver.setTemplateMode("HTML5");
    emailTemplateResolver.setCharacterEncoding(CharEncoding.UTF_8);
    emailTemplateResolver.setOrder(1);
    return emailTemplateResolver;
}
Also used : ClassLoaderTemplateResolver(org.thymeleaf.templateresolver.ClassLoaderTemplateResolver)

Example 24 with ClassLoaderTemplateResolver

use of org.thymeleaf.templateresolver.ClassLoaderTemplateResolver in project cetc by DiscoverForever.

the class ThymeleafConfiguration method emailTemplateResolver.

@Bean
@Description("Thymeleaf template resolver serving HTML 5 emails")
public ClassLoaderTemplateResolver emailTemplateResolver() {
    ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver();
    emailTemplateResolver.setPrefix("mails/");
    emailTemplateResolver.setSuffix(".html");
    emailTemplateResolver.setTemplateMode("HTML5");
    emailTemplateResolver.setCharacterEncoding(CharEncoding.UTF_8);
    emailTemplateResolver.setOrder(1);
    return emailTemplateResolver;
}
Also used : ClassLoaderTemplateResolver(org.thymeleaf.templateresolver.ClassLoaderTemplateResolver)

Example 25 with ClassLoaderTemplateResolver

use of org.thymeleaf.templateresolver.ClassLoaderTemplateResolver in project FuryViewer by TheDoctor-95.

the class ThymeleafConfiguration method emailTemplateResolver.

@Bean
@Description("Thymeleaf template resolver serving HTML 5 emails")
public ClassLoaderTemplateResolver emailTemplateResolver() {
    ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver();
    emailTemplateResolver.setPrefix("mails/");
    emailTemplateResolver.setSuffix(".html");
    emailTemplateResolver.setTemplateMode("HTML5");
    emailTemplateResolver.setCharacterEncoding(CharEncoding.UTF_8);
    emailTemplateResolver.setOrder(1);
    return emailTemplateResolver;
}
Also used : ClassLoaderTemplateResolver(org.thymeleaf.templateresolver.ClassLoaderTemplateResolver)

Aggregations

ClassLoaderTemplateResolver (org.thymeleaf.templateresolver.ClassLoaderTemplateResolver)50 Test (org.junit.Test)18 SpringTemplateEngine (org.thymeleaf.spring5.SpringTemplateEngine)17 ArrayList (java.util.ArrayList)13 TemplateEngine (org.thymeleaf.TemplateEngine)13 Context (org.thymeleaf.context.Context)12 ITemplateResolver (org.thymeleaf.templateresolver.ITemplateResolver)12 FileTemplateResolver (org.thymeleaf.templateresolver.FileTemplateResolver)8 DefaultTemplateResolver (org.thymeleaf.templateresolver.DefaultTemplateResolver)4 Bean (org.springframework.context.annotation.Bean)3 HashMap (java.util.HashMap)2 LinkedHashSet (java.util.LinkedHashSet)2 Map (java.util.Map)2 IExpressionContext (org.thymeleaf.context.IExpressionContext)2 StandardLinkBuilder (org.thymeleaf.linkbuilder.StandardLinkBuilder)2 SpringWebFluxTemplateEngine (org.thymeleaf.spring5.SpringWebFluxTemplateEngine)2 AbstractConfigurableTemplateResolver (org.thymeleaf.templateresolver.AbstractConfigurableTemplateResolver)2 FileOutputStream (java.io.FileOutputStream)1 OutputStreamWriter (java.io.OutputStreamWriter)1 Writer (java.io.Writer)1