java.io.IOException: Zip bomb detected! The file would exceed the max.

解决办法:

添加一行代码即可

ZipSecureFile.setMinInflateRatio(-1.0d);

 

参考:

FileInputStream file = new FileInputStream("D:\\newData.xlsx");
ZipSecureFile.setMinInflateRatio(-1.0d);
XSSFWorkbook wb = new XSSFWorkbook(file);

 

posted @ 2020-08-26 16:36  久曲健  阅读(2590)  评论(0编辑  收藏  举报