Search in sources :

Example 1 with CustomDialect

use of com.baeldung.dialect.CustomDialect 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;
}
Also used : SpringTemplateEngine(org.thymeleaf.spring4.SpringTemplateEngine) CustomDialect(com.baeldung.dialect.CustomDialect) IDialect(org.thymeleaf.dialect.IDialect) HashSet(java.util.HashSet) Description(org.springframework.context.annotation.Description) Bean(org.springframework.context.annotation.Bean)

Aggregations

CustomDialect (com.baeldung.dialect.CustomDialect)1 HashSet (java.util.HashSet)1 Bean (org.springframework.context.annotation.Bean)1 Description (org.springframework.context.annotation.Description)1 IDialect (org.thymeleaf.dialect.IDialect)1 SpringTemplateEngine (org.thymeleaf.spring4.SpringTemplateEngine)1