feat: OpenAPI 接口支持读取 Spring Security 白名单路径并跳过 Authorization 头,优化 Ant 风格路径匹配

This commit is contained in:
Ray.Hao
2025-01-13 18:09:30 +08:00
parent d9e25874ed
commit 6aa9d7b393
3 changed files with 44 additions and 43 deletions

View File

@@ -86,8 +86,7 @@ security:
refresh-token-time-to-live: 604800
# 无需认证的请求路径
ignore-urls:
- /api/v1/auth/login # 用户登录接口
- /api/v1/auth/wechat-login # 微信登录接口
- /api/v1/auth/login/** # 登录接口(账号密码登录、手机验证码登录和微信登录)
- /api/v1/auth/captcha # 验证码获取接口
- /api/v1/auth/refresh-token # 刷新令牌接口
- /ws/** # WebSocket接口
@@ -138,13 +137,13 @@ sms:
domain: dysmsapi.aliyuncs.com
regionId: cn-shanghai
signName: 有来技术
templateCodes:
# 注册(预留)
templates:
# 注册短信验证码模板
register: SMS_22xxx771
# 登录(预留)
# 登录短信验证码模板
login: SMS_22xxx772
# 修改密码
changePassword: SMS_22xxx773
# 修改手机号短信验证码模板
change-mobile: SMS_22xxx773
# springdoc配置 https://springdoc.org/properties.html
springdoc: