use of org.thymeleaf.spring5.SpringTemplateEngine in project zhcet-web by zhcet-amu.
the class TemplateConfig method emailTemplateEngine.
@Bean(name = "extraTemplateEngine")
public TemplateEngine emailTemplateEngine() {
final SpringTemplateEngine templateEngine = new SpringTemplateEngine();
// Resolver for TEXT
templateEngine.addTemplateResolver(textTemplateResolver());
// Resolver for HTML
templateEngine.addTemplateResolver(htmlTemplateResolver());
// Resolver for JS
templateEngine.addTemplateResolver(jsTemplateResolver());
// Resolver for HTML (editable) as string
templateEngine.addTemplateResolver(stringTemplateResolver());
return templateEngine;
}
use of org.thymeleaf.spring5.SpringTemplateEngine in project Flare-event-calendar by PollubCafe.
the class ThymeleafConfig method springTemplateEngine.
@Bean
public SpringTemplateEngine springTemplateEngine() {
SpringTemplateEngine templateEngine = new SpringTemplateEngine();
templateEngine.addTemplateResolver(htmlTemplateResolver());
return templateEngine;
}
use of org.thymeleaf.spring5.SpringTemplateEngine in project tutorials by eugenp.
the class ClientWebConfig method templateEngine.
@Bean
@Description("Thymeleaf template engine with Spring integration")
public SpringTemplateEngine templateEngine() {
final SpringTemplateEngine templateEngine = new SpringTemplateEngine();
templateEngine.setTemplateResolver(templateResolver());
final Set<IDialect> dialects = new HashSet<>();
dialects.add(new CustomDialect());
templateEngine.setAdditionalDialects(dialects);
return templateEngine;
}
use of org.thymeleaf.spring5.SpringTemplateEngine in project tutorials by eugenp.
the class WebMVCConfig method templateEngine.
private TemplateEngine templateEngine(ITemplateResolver templateResolver) {
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.addDialect(new LayoutDialect(new GroupingStrategy()));
engine.addDialect(new Java8TimeDialect());
engine.setTemplateResolver(templateResolver);
engine.setTemplateEngineMessageSource(messageSource());
return engine;
}
use of org.thymeleaf.spring5.SpringTemplateEngine in project irida by phac-nml.
the class WebEmailConfig method emailTemplateEngine.
@Bean
public SpringTemplateEngine emailTemplateEngine() {
SpringTemplateEngine emailTemplateEngine = new SpringTemplateEngine();
emailTemplateEngine.addTemplateResolver(classLoaderTemplateResolver());
return emailTemplateEngine;
}
Aggregations