修改配置
This commit is contained in:
parent
21369088ac
commit
445bdc63af
|
|
@ -37,7 +37,9 @@ public class CaptchaConfig
|
|||
// 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize)
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier");
|
||||
// 图片样式 水纹com.google.code.kaptcha.com.bonus.sgzb.machine.service.impl.WaterRipple 鱼眼com.google.code.kaptcha.com.bonus.sgzb.machine.service.impl.FishEyeGimpy 阴影com.google.code.kaptcha.com.bonus.sgzb.machine.service.impl.ShadowGimpy
|
||||
properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.com.bonus.sgzb.machine.service.impl.ShadowGimpy");
|
||||
//com.google.code.kaptcha.impl.ShadowGimpy com.bonus.sgzb.gateway.service.impl.ShadowGimpy
|
||||
|
||||
properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy");
|
||||
Config config = new Config(properties);
|
||||
defaultKaptcha.setConfig(config);
|
||||
return defaultKaptcha;
|
||||
|
|
@ -62,7 +64,7 @@ public class CaptchaConfig
|
|||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "35");
|
||||
// KAPTCHA_SESSION_KEY
|
||||
properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath");
|
||||
// 验证码文本生成器
|
||||
// 验证码文本生成器 com.bonus.sgzb.gateway.config.KaptchaTextCreator
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "com.bonus.sgzb.gateway.config.KaptchaTextCreator");
|
||||
// 验证码文本字符间距 默认为2
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_SPACE, "3");
|
||||
|
|
@ -72,10 +74,10 @@ public class CaptchaConfig
|
|||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier");
|
||||
// 验证码噪点颜色 默认为Color.BLACK
|
||||
properties.setProperty(KAPTCHA_NOISE_COLOR, "white");
|
||||
// 干扰实现类
|
||||
properties.setProperty(KAPTCHA_NOISE_IMPL, "com.google.code.kaptcha.com.bonus.sgzb.machine.service.impl.NoNoise");
|
||||
// 干扰实现类com.google.code.kaptcha.impl.NoNoise
|
||||
properties.setProperty(KAPTCHA_NOISE_IMPL, "com.google.code.kaptcha.impl.NoNoise");
|
||||
// 图片样式 水纹com.google.code.kaptcha.com.bonus.sgzb.machine.service.impl.WaterRipple 鱼眼com.google.code.kaptcha.com.bonus.sgzb.machine.service.impl.FishEyeGimpy 阴影com.google.code.kaptcha.com.bonus.sgzb.machine.service.impl.ShadowGimpy
|
||||
properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.com.bonus.sgzb.machine.service.impl.ShadowGimpy");
|
||||
properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy");
|
||||
Config config = new Config(properties);
|
||||
defaultKaptcha.setConfig(config);
|
||||
return defaultKaptcha;
|
||||
|
|
|
|||
Loading…
Reference in New Issue