use of org.ff4j.web.thymeleaf.CustomMessageResolver in project ff4j by ff4j.
the class FF4jServlet method initializeTemplateEngine.
/**
* Initialize Thymeleaf.
*/
private void initializeTemplateEngine() {
ClassLoaderTemplateResolver templateResolver = new ClassLoaderTemplateResolver();
templateResolver.setTemplateMode("XHTML");
templateResolver.setPrefix("views/view-");
templateResolver.setSuffix(".html");
templateResolver.setCacheTTLMs(3600000L);
templateEngine = new TemplateEngine();
templateEngine.setTemplateResolver(templateResolver);
templateEngine.addMessageResolver(new CustomMessageResolver());
LOGGER.info("Thymeleaf has been initialized");
}
Aggregations