当前位置: 代码迷 >> 综合 >> java.io.IOException: Zip bomb detected! The file would exceed the max.
  详细解决方案

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

热度:89   发布时间:2023-11-14 23:09:11.0

解决办法:

添加一行代码即可

ZipSecureFile.setMinInflateRatio(-1.0d);

参考:

FileInputStream file = new FileInputStream("/file/path/report.xlsx"); 
ZipSecureFile.setMinInflateRatio(-1.0d);
XSSFWorkbook wb = new XSSFWorkbook(file);

 

  相关解决方案