提交 caa50a9a authored 作者: 马晨俊's avatar 马晨俊

mcj:注释生成模版代码

上级 90ac595e
...@@ -115,17 +115,17 @@ public class InspectController { ...@@ -115,17 +115,17 @@ public class InspectController {
map.put("techMap",techMap); map.put("techMap",techMap);
map.put("warnMap",warnMap); map.put("warnMap",warnMap);
map.put("technologies",technologies); map.put("technologies",technologies);
try { // try {
String template = FreemarkerUtils.getTemplate("pg.ftl", map); // String template = FreemarkerUtils.getTemplate("pg.ftl", map);
String s = inspectService.generateHtml(template, map); // String s = inspectService.generateHtml(template, map);
String filePath = FileUtil.createFilePath(); // String filePath = FileUtil.createFilePath();
File file1 = new File("./pgbg/" + filePath + "/" + file.getName() + ".html"); // File file1 = new File("./pgbg/" + filePath + "/" + file.getName() + ".html");
FileUtil.write(s,"./pgbg/"+filePath+"/"+file.getName()+".html"); // FileUtil.write(s,"./pgbg/"+filePath+"/"+file.getName()+".html");
reportVo.setHtmlAddress(file1.getCanonicalPath()); // reportVo.setHtmlAddress(file1.getCanonicalPath());
System.out.println("内容"+s); // System.out.println("内容"+s);
} catch (TemplateException e) { // } catch (TemplateException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
Report report = new Report(); Report report = new Report();
String random = RandomUtil.getRandom(); String random = RandomUtil.getRandom();
report.setId(RandomUtil.getRandom()); report.setId(RandomUtil.getRandom());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论