|
|
@@ -143,7 +143,7 @@ public class UserConfig {
|
|
|
/**
|
|
|
* 用于随机选的数字
|
|
|
*/
|
|
|
- public static final String BASE_NUMBER = "345678";
|
|
|
+ public static final String BASE_NUMBER = "23456789";
|
|
|
/**
|
|
|
* 用于随机选的字符
|
|
|
*/
|
|
|
@@ -151,7 +151,7 @@ public class UserConfig {
|
|
|
/**
|
|
|
* 用于随机选的字符和数字
|
|
|
*/
|
|
|
- public static final String BASE_CHAR_NUMBER = BASE_CHAR + BASE_NUMBER;
|
|
|
+ public static final String BASE_CHAR_NUMBER = BASE_NUMBER;
|
|
|
|
|
|
private boolean enabled = false;
|
|
|
private boolean forceEnabled = true;// 是否开启错误N次之后强制开启验证码
|
|
|
@@ -166,14 +166,14 @@ public class UserConfig {
|
|
|
private String interfereType = INTERFERE_TYPE_LINE;
|
|
|
private int width = 100;
|
|
|
private int height = 32;
|
|
|
- private int codeCount = 5;
|
|
|
- private int interfereCount = 10;
|
|
|
+ private int codeCount = 4;
|
|
|
+ private int interfereCount = 0;
|
|
|
|
|
|
- private boolean backgroundRandomEnabled = true;
|
|
|
- private int backgroundRandomRange = 10; // 0 ~255
|
|
|
- private int backgroundRed = 180; // 0 ~255
|
|
|
- private int backgroundGreen = 180; // 0 ~255
|
|
|
- private int backgroundBlue = 180; // 0 ~255
|
|
|
+ private boolean backgroundRandomEnabled = false;
|
|
|
+ private int backgroundRandomRange = 255; // 0 ~255
|
|
|
+ private int backgroundRed = 249; // 0 ~255
|
|
|
+ private int backgroundGreen = 251; // 0 ~255
|
|
|
+ private int backgroundBlue = 220; // 0 ~255
|
|
|
private int backgroundAlpha = 100; // 0 ~255
|
|
|
private String backgroundRgb = null; // 十六进制
|
|
|
private String fontName = null; // 字体名称
|
|
|
@@ -209,7 +209,6 @@ public class UserConfig {
|
|
|
setBackground(captcha);
|
|
|
setGenerator(captcha);
|
|
|
setFont(captcha);
|
|
|
-
|
|
|
captcha.createCode();
|
|
|
|
|
|
return captcha;
|