|
@@ -11,7 +11,7 @@ import static com.google.code.kaptcha.Constants.*;
|
|
|
|
|
|
/**
|
|
|
* 验证码配置
|
|
|
- *
|
|
|
+ *
|
|
|
* @author ruoyi
|
|
|
*/
|
|
|
@Configuration
|
|
@@ -39,12 +39,12 @@ 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.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
|
|
|
- properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy");
|
|
|
+ properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.WaterRipple");
|
|
|
Config config = new Config(properties);
|
|
|
defaultKaptcha.setConfig(config);
|
|
|
return defaultKaptcha;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@Bean(name = "captchaProducerMath")
|
|
|
public DefaultKaptcha getKaptchaBeanMath()
|
|
|
{
|
|
@@ -77,9 +77,9 @@ public class CaptchaConfig
|
|
|
// 干扰实现类
|
|
|
properties.setProperty(KAPTCHA_NOISE_IMPL, "com.google.code.kaptcha.impl.NoNoise");
|
|
|
// 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
|
|
|
- properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy");
|
|
|
+ properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.WaterRipple");
|
|
|
Config config = new Config(properties);
|
|
|
defaultKaptcha.setConfig(config);
|
|
|
return defaultKaptcha;
|
|
|
}
|
|
|
-}
|
|
|
+}
|