freemarker输出乱码
// 指定输出的目录及文件名
// Writer out = new FileWriter(new File(path+ “.html”));
OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(path+ “.html”),
“UTF-8”);
PrintWriter printWriter = new PrintWriter(writer);
// 生成静态页面
template.process(data, printWriter);
// 关闭流
printWriter.close();