增加验证码类型设置功能(纯数字、纯字母)

This commit is contained in:
synchronized
2018-07-27 17:08:16 +08:00
parent 371acb3198
commit 71e73ee516
4 changed files with 50 additions and 5 deletions

View File

@@ -14,9 +14,12 @@ public class CaptchaTest {
@Test
public void test() throws Exception {
SpecCaptcha specCaptcha = new SpecCaptcha();
System.out.println(specCaptcha.text());
//specCaptcha.out(new FileOutputStream(new File("D:/a/aa.png")));
for (int i = 0; i < 100; i++) {
SpecCaptcha specCaptcha = new SpecCaptcha();
specCaptcha.setCharType(Captcha.TYPE_ONLY_NUMBER);
System.out.println(specCaptcha.text());
specCaptcha.out(new FileOutputStream(new File("D:/a/aa" + i + ".png")));
}
}
@Test