easyexcel导入报错java.io.IOException: Zip bomb detected!

使用easyexcel导入文件,结果提示报错:

java.io.IOException: Zip bomb detected! The file would exceed the max. ratio of compressed file size to the size of the expanded data.
This may indicate that the file is used to inflate memory usage and thus could pose a security risk.
You can adjust this limit via ZipSecureFile.setMinInflateRatio() if you need to work with files which exceed this limit.
Counter: 2459394, cis.counter: 24576, ratio: 0.009992705520140328
Limits: MIN_INFLATE_RATIO: 0.01

之前使用,并未遇到过,网上搜索

// 延迟解析比率
ZipSecureFile.setMinInflateRatio(-1.0d);

加上后解决了,临时解决下,后期补充完整上传代码

猜你喜欢

转载自blog.csdn.net/KeepLearnZhangXiaoBo/article/details/114139510