Skip to content

Commit f85ae8f

Browse files
committed
1 修复ToolScript的问题
1 parent 58f6fa8 commit f85ae8f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

common/src/main/java/pro/tools/script/ToolScript.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
package pro.tools.script;
22

3+
import com.google.common.collect.Lists;
34
import org.slf4j.Logger;
45
import org.slf4j.LoggerFactory;
6+
import pro.tools.path.ToolPath;
57

68
import javax.script.ScriptEngine;
79
import javax.script.ScriptEngineManager;
810
import javax.script.ScriptException;
11+
import java.io.IOException;
12+
import java.nio.file.Paths;
913
import java.util.Map;
1014

1115
/**
@@ -83,7 +87,11 @@ public static String render(String templateContent, Map<String, Object> paramMap
8387
*/
8488
public static void makeHtml(String tlPath, Map<String, Object> paramMap, String htmlPath) throws ScriptException {
8589
String html = render(tlPath, paramMap);
86-
//ToolDirFile.createFile(htmlPath, html);
90+
try {
91+
ToolPath.writeStrings(Paths.get(htmlPath), Lists.newArrayList(html), false);
92+
} catch (IOException e) {
93+
e.printStackTrace();
94+
}
8795
}
8896

8997
}

0 commit comments

Comments
 (0)