Simple yet powerful verification code library written in Java with zero dependency.
You can generate verification code picture like this:
Numeric
Chinese
Built-in fonts
- Add following dependency in your
pom.xml
<dependency>
<groupId>com.hellokaton</groupId>
<artifactId>blade-captcha</artifactId>
<version>0.1.0</version>
</dependency>
- Add following dependency in your code
@GET("/captcha")
public void captcha() throws IOException {
GifCaptcha captcha = new GifCaptcha(130, 48, 6);
System.out.println(captcha.text());
CaptchaKit.render(captcha);
}