refactor: 优化验证码样式
This commit is contained in:
@@ -25,6 +25,8 @@ import java.util.Date;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 认证服务实现类
|
||||||
|
*
|
||||||
* @author haoxr
|
* @author haoxr
|
||||||
* @since 2.4.0
|
* @since 2.4.0
|
||||||
*/
|
*/
|
||||||
@@ -85,7 +87,7 @@ public class AuthServiceImpl implements AuthService {
|
|||||||
public CaptchaResult getCaptcha() {
|
public CaptchaResult getCaptcha() {
|
||||||
|
|
||||||
MathGenerator mathGenerator=new MathGenerator(1);
|
MathGenerator mathGenerator=new MathGenerator(1);
|
||||||
CircleCaptcha circleCaptcha =new CircleCaptcha(150,25,4,3);
|
CircleCaptcha circleCaptcha =new CircleCaptcha(120,25,4,3);
|
||||||
circleCaptcha.setGenerator(mathGenerator);
|
circleCaptcha.setGenerator(mathGenerator);
|
||||||
String captchaCode = circleCaptcha.getCode(); // 验证码
|
String captchaCode = circleCaptcha.getCode(); // 验证码
|
||||||
String captchaBase64 = circleCaptcha.getImageBase64Data(); // 验证码图片Base64
|
String captchaBase64 = circleCaptcha.getImageBase64Data(); // 验证码图片Base64
|
||||||
|
|||||||
Reference in New Issue
Block a user