Search in sources :

Example 1 with GroupingStrategy

use of nz.net.ultraq.thymeleaf.decorators.strategies.GroupingStrategy 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;
}
Also used : SpringTemplateEngine(org.thymeleaf.spring4.SpringTemplateEngine) GroupingStrategy(nz.net.ultraq.thymeleaf.decorators.strategies.GroupingStrategy) LayoutDialect(nz.net.ultraq.thymeleaf.LayoutDialect) Java8TimeDialect(org.thymeleaf.extras.java8time.dialect.Java8TimeDialect)

Aggregations

LayoutDialect (nz.net.ultraq.thymeleaf.LayoutDialect)1 GroupingStrategy (nz.net.ultraq.thymeleaf.decorators.strategies.GroupingStrategy)1 Java8TimeDialect (org.thymeleaf.extras.java8time.dialect.Java8TimeDialect)1 SpringTemplateEngine (org.thymeleaf.spring4.SpringTemplateEngine)1