|
@@ -6,6 +6,7 @@ import com.deepoove.poi.data.Rows;
|
|
|
import com.deepoove.poi.data.TableRenderData;
|
|
|
import com.deepoove.poi.data.Tables;
|
|
|
import com.deepoove.poi.data.style.BorderStyle;
|
|
|
+import com.miniframe.tools.XIFileUtils;
|
|
|
import com.miniframe.tools.XIPdfUtils;
|
|
|
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
|
|
|
|
@@ -69,9 +70,7 @@ public class WordReport {
|
|
|
persons.add(person);
|
|
|
persons.add(person);
|
|
|
data.setPersons(persons);
|
|
|
- URL resource = WordReport.class.getClassLoader().getResource("templates/word/report.docx");
|
|
|
- String path = resource.getPath();
|
|
|
- XWPFTemplate template = XWPFTemplate.compile(path).render(data);
|
|
|
+ XWPFTemplate template = XWPFTemplate.compile("src/main/resources/templates/word/report.docx").render(data);
|
|
|
template.writeAndClose(bos);
|
|
|
|
|
|
// XWPFTemplate.compile("D://pname.docx").render(new HashMap<String, Object>() {
|