新增:新增获取图片验证码 API(引入 Redisson、Hutool、Easy Captcha 依赖,详情可见 README 介绍)

This commit is contained in:
2022-12-11 15:06:21 +08:00
parent 8967542a10
commit 1e5eaab9d3
15 changed files with 875 additions and 17 deletions

View File

@@ -3,3 +3,33 @@ server:
# HTTP 端口(默认 8080
port: 8000
--- ### Redis 单机配置
spring:
redis:
# 地址
host: ${REDIS_HOST:127.0.0.1}
# 端口(默认 6379
port: ${REDIS_PORT:6379}
# 密码(未设置密码时可为空或注释掉)
password: ${REDIS_PWD:123456}
# 数据库索引
database: ${REDIS_DB:0}
# 连接超时时间
timeout: 10s
# 是否开启 SSL
ssl: false
--- ### 验证码配置
captcha:
# 类型
type: SPEC
# 缓存键的前缀
keyPrefix: CAPTCHA
# 过期时间
expirationInMinutes: 2
# 内容长度
length: 4
# 宽度
width: 111
# 高度
height: 36

View File

@@ -3,3 +3,33 @@ server:
# HTTP 端口(默认 8080
port: 18000
--- ### Redis 单机配置
spring:
redis:
# 地址
host: ${REDIS_HOST:127.0.0.1}
# 端口(默认 6379
port: ${REDIS_PORT:6379}
# 密码(未设置密码时可为空或注释掉)
password: ${REDIS_PWD:123456}
# 数据库索引
database: ${REDIS_DB:0}
# 连接超时时间
timeout: 10s
# 是否开启 SSL
ssl: false
--- ### 验证码配置
captcha:
# 类型
type: SPEC
# 缓存键的前缀
keyPrefix: CAPTCHA
# 过期时间
expirationInMinutes: 2
# 内容长度
length: 4
# 宽度
width: 111
# 高度
height: 36

View File

@@ -52,11 +52,9 @@ spring:
date-format: yyyy-MM-dd HH:mm:ss
# 序列化配置Bean -> JSON
serialization:
# 是否格式化输出
indent_output: false
# 忽略无法转换的对象
# 允许序列化无属性的 Bean
fail_on_empty_beans: false
# 反序列化配置JSON -> Bean
deserialization:
# 忽略 JSON 中不存在的属性
# 允许反序列化不存在的属性
fail_on_unknown_properties: false