diff --git a/pqs-event/event-boot/src/main/java/com/njcn/event/utils/FreemarkerUtil.java b/pqs-event/event-boot/src/main/java/com/njcn/event/utils/FreemarkerUtil.java index 145f9ba93..a705b6a08 100644 --- a/pqs-event/event-boot/src/main/java/com/njcn/event/utils/FreemarkerUtil.java +++ b/pqs-event/event-boot/src/main/java/com/njcn/event/utils/FreemarkerUtil.java @@ -20,12 +20,13 @@ public class FreemarkerUtil { public static String generateString(String templateFileName, String templateDirectory, Map datas) throws IOException, TemplateException { Configuration configuration = new Configuration(Configuration.VERSION_2_3_0); - // 设置默认编码 configuration.setDefaultEncoding("UTF-8"); // 设置模板所在文件夹 - path = java.net.URLDecoder.decode(path,"utf-8"); + path = java.net.URLDecoder.decode(path, "utf-8"); + System.out.println("路径为:" + path); + System.out.println("templateDirectory:" + templateDirectory); configuration.setDirectoryForTemplateLoading(new File(path + templateDirectory)); // 生成模板对象