U 升级版本 改为1.2.5

This commit is contained in:
天爱有情
2022-02-22 10:11:55 +08:00
parent b3ef2fe373
commit f4ff605bca
4 changed files with 8 additions and 4 deletions
@@ -14,7 +14,7 @@ import java.io.InputStream;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import static cloud.tianai.captcha.template.slider.CaptchaImageUtils.*;
import static cloud.tianai.captcha.template.slider.util.CaptchaImageUtils.*;
/**
* @Author: 天爱有情
@@ -1,4 +1,4 @@
package cloud.tianai.captcha.template.slider;
package cloud.tianai.captcha.template.slider.util;
import lombok.SneakyThrows;
@@ -25,6 +25,8 @@ public class CaptchaImageUtils {
if (resourceImage == null) {
throw new IllegalArgumentException("包装文件到 BufferedImage 失败, file不能为空");
}
// 关闭磁盘缓存
ImageIO.setUseCache(false);
return ImageIO.read(resourceImage);
}
@@ -33,6 +35,8 @@ public class CaptchaImageUtils {
if (resource == null) {
throw new IllegalArgumentException("包装文件到 BufferedImage 失败, file不能为空");
}
// 关闭磁盘缓存
ImageIO.setUseCache(false);
return ImageIO.read(resource);
}