|
@@ -8,7 +8,6 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
import com.wf.captcha.SpecCaptcha;
|
|
import com.wf.captcha.SpecCaptcha;
|
|
|
-import com.wf.captcha.ArithmeticCaptcha;
|
|
|
|
|
import com.wf.captcha.base.Captcha;
|
|
import com.wf.captcha.base.Captcha;
|
|
|
import com.ufo.base.common.constant.CacheConstants;
|
|
import com.ufo.base.common.constant.CacheConstants;
|
|
|
import com.ufo.base.common.constant.Constants;
|
|
import com.ufo.base.common.constant.Constants;
|
|
@@ -60,7 +59,7 @@ public class CaptchaController
|
|
|
if ("math".equals(captchaType))
|
|
if ("math".equals(captchaType))
|
|
|
{
|
|
{
|
|
|
// 算术验证码
|
|
// 算术验证码
|
|
|
- captcha = new ArithmeticCaptcha(130, 48);
|
|
|
|
|
|
|
+ captcha = new PureJavaArithmeticCaptcha(130, 48);
|
|
|
captcha.setLen(2); // 设置位数
|
|
captcha.setLen(2); // 设置位数
|
|
|
code = captcha.text(); // 获取运算的结果:5
|
|
code = captcha.text(); // 获取运算的结果:5
|
|
|
}
|
|
}
|