EasyCaptcha icon indicating copy to clipboard operation
EasyCaptcha copied to clipboard

Java图形验证码,支持gif、中文、算术等类型,可用于Java Web、JavaSE等项目。

Results 32 EasyCaptcha issues
Sort by recently updated
recently updated
newest added

```java SpecCaptcha captcha = new SpecCaptcha(130, 48, 4); System.out.println(captcha.toBase64()); 调用 captcha.toBase64() 方法 会导致系统内存持续上涨,求解决方案 ```

做了一个简单的压测,普通字母png比中文png慢很多,数据如下: https://github.com/power4j/java-perf/tree/master/easy-captcha 使用内建字体的时候,创建字体消耗了 30%的时间,是不是可以缓存一下,担心资源占用可以加个开关选项。 ![ec-1](https://user-images.githubusercontent.com/2360910/104708004-1cfccc00-5758-11eb-8705-2d00858d83d1.png) 使用中文验证码,没有创建字体就好多了。 ![ec-2](https://user-images.githubusercontent.com/2360910/104708011-1ec68f80-5758-11eb-8c77-3b2e9236e2a1.png)

我知道是因为fontconfig这个东西,我想说的是可否改成不依赖这个fontconfig,这样就无需对程序运行环境进行修改了 (google的captcha有同样的这个问题)

我原本使用 ``` com.github.whvcse easyCaptcha 1.5.0 ``` 现在中央仓库已经没有这个包了。(https://repo1.maven.org/maven2/com/github/whvcse/) 每次一联网打包,就报错了 ``` [ERROR] Failed to execute goal on project mvc: Could not resolve dependencies for project : Could not find artifact com.github.whvcse:EasyCaptcha:jar:1.5.0 in...

之前我也写了一个类似的验证码工具,想参考下作者的漂亮字体,测试算术计算验证码发现有部分字体无法展示+、-、=符号

## 描述 1. 正常调试无问题 2. 打包成 docker 后,报空指针 ## docker file ``` FROM frolvlad/alpine-oraclejdk8:slim # 包与运行 RUN mkdir /data ADD ./target/mini-admin-0.0.1-SNAPSHOT.jar /data/app.jar EXPOSE 8080 ENTRYPOINT ["java", "-jar", "-server", "-Xmx2048m", "-Xms2048m","-Dspring.profiles.active=prod",...

java.io.IOException: Problem reading font data. at java.awt.Font.createFont0(Font.java:1000) ~[?:1.8.0_111-internal] at java.awt.Font.createFont(Font.java:877) ~[?:1.8.0_111-internal] at com.wf.captcha.base.Captcha.setFont(Captcha.java:277) ~[easy-captcha-1.6.2.jar!/:?] at com.wf.captcha.base.Captcha.setFont(Captcha.java:273) ~[easy-captcha-1.6.2.jar!/:?] at com.wf.captcha.base.Captcha.setFont(Captcha.java:269) ~[easy-captcha-1.6.2.jar!/:?] docker里没有字体?

对算数型验证码进行测试: ` for (int i = 0; i < 100; i++) { Captcha captcha = new ArithmeticCaptcha(111, 36, 3); System.out.println(captcha.text()); } ` 测试的结果中,少部分结果是浮点型,这样前端输验证码是肯定匹配错误的 7.0 1 -10 2.0 24 16 7...