kaptcha: https://github.com/penggle/kaptcha
基于 SimpleCaptcha 开发的验证码插件,google开源插件
1、引入kaptcha maven依赖
kaptcha 依赖
|
2、构建 kaptcha 配置类,并添加@Configuration 注解
-
springboot启动时会自动读取配置参数,并将DefaultKaptcha 实例 captchaProducer 注入到spring容器中
-
验证码样式及格式在配置参数中设置
kaptcha 配置类
|