摘要: 1 import org.junit.Test; 2 3 import java.io.*; 4 5 /** 6 * User: HYY 7 * Date: 13-8-18 8 * Time: 下午8:11 9 * To change this template use File | Settings | File Templates.10 */11 public class ReplaceStr {12 private File fileRootDir = new File("D:\\ahgw\\src\\com\\ahgw");//根目录文件13 priva... 阅读全文
posted @ 2013-08-24 20:49 无忧之路 阅读(1649) 评论(0) 推荐(0) 编辑
摘要: 读取模板的时候有一个编码:Template template = this.tempConfiguration.getTemplate(templatePath,"UTF-8");生成文件的时候使用编码:Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(htmlFile), "UTF-8"));附(freeMarker生成静态文件的代码):public class MakeHtml { private Configuration tempConfigur 阅读全文
posted @ 2013-08-24 20:43 无忧之路 阅读(756) 评论(0) 推荐(0) 编辑
无忧之路