mirror of
https://github.com/dromara/tianai-captcha.git
synced 2026-05-23 18:42:44 +08:00
U 升级版本 改为1.2.5
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>cloud.tianai.captcha</groupId>
|
<groupId>cloud.tianai.captcha</groupId>
|
||||||
<artifactId>tianai-captcha</artifactId>
|
<artifactId>tianai-captcha</artifactId>
|
||||||
<version>1.3.0</version>
|
<version>1.2.5</version>
|
||||||
|
|
||||||
<name>tianai-captcha</name>
|
<name>tianai-captcha</name>
|
||||||
<description>滑块验证码</description>
|
<description>滑块验证码</description>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cloud.tianai.captcha</groupId>
|
<groupId>cloud.tianai.captcha</groupId>
|
||||||
<artifactId>tianai-captcha</artifactId>
|
<artifactId>tianai-captcha</artifactId>
|
||||||
<version>1.3.0</version>
|
<version>1.2.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
2. 使用 `SliderCaptchaTemplate`获取滑块验证码
|
2. 使用 `SliderCaptchaTemplate`获取滑块验证码
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ import java.io.InputStream;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
import static cloud.tianai.captcha.template.slider.CaptchaImageUtils.*;
|
import static cloud.tianai.captcha.template.slider.util.CaptchaImageUtils.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: 天爱有情
|
* @Author: 天爱有情
|
||||||
|
|||||||
+5
-1
@@ -1,4 +1,4 @@
|
|||||||
package cloud.tianai.captcha.template.slider;
|
package cloud.tianai.captcha.template.slider.util;
|
||||||
|
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
|
|
||||||
@@ -25,6 +25,8 @@ public class CaptchaImageUtils {
|
|||||||
if (resourceImage == null) {
|
if (resourceImage == null) {
|
||||||
throw new IllegalArgumentException("包装文件到 BufferedImage 失败, file不能为空");
|
throw new IllegalArgumentException("包装文件到 BufferedImage 失败, file不能为空");
|
||||||
}
|
}
|
||||||
|
// 关闭磁盘缓存
|
||||||
|
ImageIO.setUseCache(false);
|
||||||
return ImageIO.read(resourceImage);
|
return ImageIO.read(resourceImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,6 +35,8 @@ public class CaptchaImageUtils {
|
|||||||
if (resource == null) {
|
if (resource == null) {
|
||||||
throw new IllegalArgumentException("包装文件到 BufferedImage 失败, file不能为空");
|
throw new IllegalArgumentException("包装文件到 BufferedImage 失败, file不能为空");
|
||||||
}
|
}
|
||||||
|
// 关闭磁盘缓存
|
||||||
|
ImageIO.setUseCache(false);
|
||||||
return ImageIO.read(resource);
|
return ImageIO.read(resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user