String tmpPath=FileUtil.getParentPath(templateFilePath);
String tmpName=FileUtil.getFileName(templateFilePath);
Configuration cfg =new Configuration();
cfg.setDirectoryForTemplateLoading(new File(tmpPath));
cfg.setObjectWrapper(new DefaultObjectWrapper());
//读取模板
Template template= cfg.getTemplate(tmpName);
//输出到文件