mirror of
https://github.com/dromara/tianai-captcha.git
synced 2026-05-21 00:44:04 +08:00
1.5.0正式版
This commit is contained in:
@@ -59,7 +59,9 @@ public class CacheImageCaptchaGenerator implements ImageCaptchaGenerator {
|
||||
this.size = size;
|
||||
this.waitTime = waitTime;
|
||||
this.period = period;
|
||||
this.expireTime = expireTime;
|
||||
if (expireTime != null){
|
||||
this.expireTime = expireTime;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,8 +12,10 @@ public class TACBuilderTest {
|
||||
ImageCaptchaApplication application = TACBuilder.builder()
|
||||
.addDefaultTemplate()
|
||||
.addResource("SLIDER", new Resource("classpath", "META-INF/cut-image/resource/1.jpg"))
|
||||
.addResource("WORD_IMAGE_CLICK", new Resource("classpath", "META-INF/cut-image/resource/1.jpg"))
|
||||
.addResource("ROTATE", new Resource("classpath", "META-INF/cut-image/resource/1.jpg"))
|
||||
.build();
|
||||
CaptchaResponse<ImageCaptchaVO> response = application.generateCaptcha("SLIDER");
|
||||
CaptchaResponse<ImageCaptchaVO> response = application.generateCaptcha("ROTATE");
|
||||
System.out.println(response);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user