升级依赖 springboot 2.2.5、mybatis 3.5.4、mybatis-spring 2.0.3、jsqlparser
3.1、druid 1.1.21、shiro 1.5.1、j2cache 2.8.0、beetl 3.0.19 commons-fileupload 1.4、commons-beanutils 1.9.4、commons-text 1.8、ant 1.10.7、fastjson 1.2.62、jackson 2.10.2、dom4j 2.1.1、jsoup 1.12.2、thumbnailator 0.4.11、twelvemonkeys 3.5、blade-patchca 1.1.2、zxing 3.4.0、poi 4.1.2;以及springboot依赖库同步跟随升级,如:spring framework 5.2.4、tomcat 9.0.31、mysql jdbc 8.0、postgresql 42.2 等等
This commit is contained in:
@@ -11,7 +11,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.apache.poi.POIXMLDocument;
|
||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||
import org.apache.poi.openxml4j.opc.OPCPackage;
|
||||
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
||||
@@ -44,11 +45,12 @@ public class WordExport {
|
||||
*/
|
||||
public void setTemplate(String templatePath) {
|
||||
try {
|
||||
this.document = new XWPFDocument(POIXMLDocument.openPackage(templatePath));
|
||||
|
||||
this.document = new XWPFDocument(OPCPackage.open(templatePath));
|
||||
bookMarks = new BookMarks(document);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvalidFormatException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user