use of org.thymeleaf.spring4.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.spring4.SpringTemplateEngine in project yqq by yeycfri.
the class WebConfig method viewResovler.
@Bean
public ViewResolver viewResovler(SpringTemplateEngine templateEngine) {
ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
viewResolver.setTemplateEngine(templateEngine);
return viewResolver;
}
use of org.thymeleaf.spring4.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.spring4.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.spring4.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;
}
Aggregations