From e8bad4e24ea23b546b3d7512ee2f1151b8cdb660 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 19 Dec 2018 00:44:12 +0400 Subject: [PATCH] try to fix template resolvers, step 2 --- .../ru/ulstu/configuration/MailTemplateConfiguration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/configuration/MailTemplateConfiguration.java b/src/main/java/ru/ulstu/configuration/MailTemplateConfiguration.java index 5f41117..d10e964 100644 --- a/src/main/java/ru/ulstu/configuration/MailTemplateConfiguration.java +++ b/src/main/java/ru/ulstu/configuration/MailTemplateConfiguration.java @@ -24,8 +24,10 @@ public class MailTemplateConfiguration { public ClassLoaderTemplateResolver emailTemplateResolver() { ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver(); - emailTemplateResolver.setPrefix("/mail_templates/"); + emailTemplateResolver.setPrefix("mail_templates/"); emailTemplateResolver.setTemplateMode("HTML5"); + emailTemplateResolver.setSuffix(".html"); + emailTemplateResolver.setOrder(1); emailTemplateResolver.setCharacterEncoding(StandardCharsets.UTF_8.name()); return emailTemplateResolver; }