public class DefaultCaptchaStorage extends Object implements CaptchaStorage
| 构造器和说明 |
|---|
DefaultCaptchaStorage() |
DefaultCaptchaStorage(CacheService cacheService) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
delete(String captchaId)
删除验证码
|
Captcha |
findCaptcha(String captchaId)
根据手机号取得验证码
|
int |
getCacheSeconds() |
CacheService |
getCacheService() |
String |
getKeyPrefix() |
protected String |
key(String captchaId) |
void |
save(String captchaId,
Captcha captcha)
保存验证码
|
void |
save(String captchaId,
String code,
int expireSeconds)
保存验证码
|
void |
setCacheSeconds(int cacheSeconds) |
void |
setCacheService(CacheService cacheService) |
void |
setKeyPrefix(String keyPrefix) |
public DefaultCaptchaStorage()
public DefaultCaptchaStorage(CacheService cacheService)
public Captcha findCaptcha(String captchaId)
CaptchaStoragefindCaptcha 在接口中 CaptchaStoragepublic void save(String captchaId, String code, int expireSeconds)
CaptchaStoragesave 在接口中 CaptchaStoragepublic void save(String captchaId, Captcha captcha)
CaptchaStoragesave 在接口中 CaptchaStoragepublic void delete(String captchaId)
CaptchaStoragedelete 在接口中 CaptchaStoragepublic String getKeyPrefix()
public void setKeyPrefix(String keyPrefix)
public CacheService getCacheService()
public void setCacheService(CacheService cacheService)
public int getCacheSeconds()
public void setCacheSeconds(int cacheSeconds)
Copyright © 2024. All rights reserved.