笑笑兔 2024-01-22 发布于天津 | 转藏 前言 使用的是 Google 的 kaptcha 框架,只需要自己配置一些参数即可。 使用方法如下: 1、pom依赖引入 <!-- https:///artifact/com.github.penggle/kaptcha --> <dependency> <groupId>com.github.penggle</groupId> <artifactId>kaptcha</artifactId> <version>2.3.2</version> </dependency> 2、创建KaptchaConfig类 @Component public class KaptchaConfig { @Bean public DefaultKaptcha getDefaultKaptcha() { com.google.code.kaptcha.impl.DefaultKaptcha defaultKaptcha = new com.google.code.kaptcha.impl.DefaultKaptcha(); Properties...