Search in sources :

Example 1 with ThymeleafTemplateEngine

use of io.vertx.reactivex.ext.web.templ.thymeleaf.ThymeleafTemplateEngine in project gravitee-access-management by gravitee-io.

the class ThymeleafConfiguration method getTemplateEngine.

@Bean
public ThymeleafTemplateEngine getTemplateEngine() {
    ThymeleafTemplateEngine thymeleafTemplateEngine = ThymeleafTemplateEngine.create(vertx);
    TemplateEngine templateEngine = thymeleafTemplateEngine.getDelegate().getThymeleafTemplateEngine();
    // set template resolvers
    DomainBasedTemplateResolver overrideTemplateResolver = (DomainBasedTemplateResolver) overrideTemplateResolver();
    overrideTemplateResolver.setTemplateEngine(templateEngine);
    templateEngine.setTemplateResolver(overrideTemplateResolver);
    templateEngine.addTemplateResolver(defaultTemplateResolver());
    return thymeleafTemplateEngine;
}
Also used : ThymeleafTemplateEngine(io.vertx.reactivex.ext.web.templ.thymeleaf.ThymeleafTemplateEngine) TemplateEngine(org.thymeleaf.TemplateEngine) ThymeleafTemplateEngine(io.vertx.reactivex.ext.web.templ.thymeleaf.ThymeleafTemplateEngine) Bean(org.springframework.context.annotation.Bean)

Aggregations

ThymeleafTemplateEngine (io.vertx.reactivex.ext.web.templ.thymeleaf.ThymeleafTemplateEngine)1 Bean (org.springframework.context.annotation.Bean)1 TemplateEngine (org.thymeleaf.TemplateEngine)1