类 AbstractCaptchaService
java.lang.Object
com.xingyuv.captcha.service.impl.AbstractCaptchaService
- 所有已实现的接口:
CaptchaService
- 直接已知子类:
BlockPuzzleCaptchaServiceImpl,ClickWordCaptchaServiceImpl,DefaultCaptchaServiceImpl,RotatePuzzleCaptchaServiceImpl
Created by raodeming on 2019/12/25.
-
字段概要
字段修饰符和类型字段说明protected static Stringprotected static Booleanprotected static intprotected Font点选文字字体protected static Stringprotected static Longprotected static Longprotected static intprotected static intprotected static final Stringprivate static FrequencyLimitHandlerprotected org.slf4j.Loggerprotected static Stringprotected static Stringprotected static Stringprotected static Stringprotected Font水印字体protected static String -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voidafterValidateFail(CaptchaVO data) static booleanbase64StrToImage(String imgStr, String path) 核对验证码(前端)static String解密前端坐标aes加密voiddestroy(Properties config) 历史资源清除(过期的图片文件,生成的临时图片...)获取验证码protected CaptchaCacheServicegetCacheService(String cacheType) protected static intprotected Stringvoidinit(Properties config) 判断应用是否实现了自定义缓存,没有就使用内存private void加载resources下的font字体,add by lide1202@hotmail.com 部署在linux中,如果没有安装中文字段,水印和点选文字,中文无法显示, 通过加载resources下的font字体解决,无需在linux中安装字体protected booleanvalidatedReq(ResponseModel resp) verification(CaptchaVO captchaVO) 二次校验验证码(后端)从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.xingyuv.captcha.service.CaptchaService
captchaType
-
字段详细资料
-
logger
protected org.slf4j.Logger logger -
IMAGE_TYPE_PNG
- 另请参阅:
-
HAN_ZI_SIZE
protected static int HAN_ZI_SIZE -
HAN_ZI_SIZE_HALF
protected static int HAN_ZI_SIZE_HALF -
REDIS_CAPTCHA_KEY
-
REDIS_SECOND_CAPTCHA_KEY
-
EXPIRESIN_SECONDS
-
EXPIRESIN_THREE
-
waterMark
-
waterMarkFontStr
-
waterMarkFont
水印字体 -
slipOffset
-
captchaAesStatus
-
clickWordFontStr
-
clickWordFont
点选文字字体 -
cacheType
-
captchaInterferenceOptions
protected static int captchaInterferenceOptions -
limitHandler
-
-
构造器详细资料
-
AbstractCaptchaService
public AbstractCaptchaService()
-
-
方法详细资料
-
init
判断应用是否实现了自定义缓存,没有就使用内存- 指定者:
init在接口中CaptchaService- 参数:
config- config
-
getCacheService
-
destroy
从接口复制的说明:CaptchaService历史资源清除(过期的图片文件,生成的临时图片...)- 指定者:
destroy在接口中CaptchaService- 参数:
config- 配置项 控制资源清理的粒度
-
get
从接口复制的说明:CaptchaService获取验证码- 指定者:
get在接口中CaptchaService- 参数:
captchaVO- captchaVO- 返回:
- ResponseModel
-
check
从接口复制的说明:CaptchaService核对验证码(前端)- 指定者:
check在接口中CaptchaService- 参数:
captchaVO- captchaVO- 返回:
- ResponseModel
-
verification
从接口复制的说明:CaptchaService二次校验验证码(后端)- 指定者:
verification在接口中CaptchaService- 参数:
captchaVO- captchaVO- 返回:
- ResponseModel
-
validatedReq
-
getValidateClientId
-
afterValidateFail
-
loadWaterMarkFont
private void loadWaterMarkFont()加载resources下的font字体,add by lide1202@hotmail.com 部署在linux中,如果没有安装中文字段,水印和点选文字,中文无法显示, 通过加载resources下的font字体解决,无需在linux中安装字体 -
base64StrToImage
-
decrypt
解密前端坐标aes加密- 参数:
point- 前端坐标key- key- 返回:
- 前端坐标aes加密
- 抛出:
Exception- E
-
getEnOrChLength
-