通过 Html2DocRender 生产doc ,系统总是提示 路径错误
>>08:35:12:错找不到指定模板或者加载错(TEMPLATE_LOAD_ERROR): 位于0行 资源:\C:\Users\lips\Desktop\eova-eova-master\eova\src\main\webapp\office\xls\doc1.html
public void downloadDoc() {
String templateName = "doc1.html";
// 假设把模版放到\eova-oss\src\main\resources\xls\test.html
String path = PathKit.getWebRootPath() + File.separator + "office" + File.separator+ "xls" + File.separator + templateName;
// 给参数
HashMap<String, Object> data = new HashMap<>();
Record r = new Record();
r.set("name", "陆家嘴软件园");
r.set("zm", "100000");
r.set("jm", "90000");
r.set("info",
"陆家嘴软件园位于上海市峨山路91弄98号");
data.put("x", r);
render(new Html2DocRender("demo.doc", path, data));
}