refactor: 修改 MathGenerator 构造函数,添加新参数以支持更灵活的验证码生成

This commit is contained in:
Ray.Hao
2026-01-11 11:48:02 +08:00
parent 5a7314c482
commit d52ae7606e

View File

@@ -32,7 +32,7 @@ public class CaptchaConfig {
String codeType = captchaProperties.getCode().getType();
int codeLength = captchaProperties.getCode().getLength();
if ("math".equalsIgnoreCase(codeType)) {
return new MathGenerator(codeLength);
return new MathGenerator(codeLength, false);
} else if ("random".equalsIgnoreCase(codeType)) {
return new RandomGenerator(codeLength);
} else {