【7.3.3】图形验证码采用redis缓存 设置过期时间

pull/44/head
ye_star 2022-11-25 09:46:37 +08:00
parent fee65316df
commit c3c3a259de
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ public class ImageCaptchaService implements ImageCaptchaApi {
SpecCaptcha specCaptcha = new SpecCaptcha(130, 48, 5);
String verCode = specCaptcha.text().toLowerCase();
String verKey = IdUtil.simpleUUID();
cacheOperatorApi.put(verKey, verCode);
cacheOperatorApi.put(verKey, verCode, 120L);
return ImageCaptcha.builder().verImage(specCaptcha.toBase64()).verKey(verKey).build();
}