Files
schoolNews/schoolNewsServ/auth/src/main/resources/application.yml
2025-10-06 16:20:05 +08:00

79 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server:
port: 8081
spring:
application:
name: school-news-auth
# Redis配置
data:
redis:
host: localhost
port: 6379
password:
database: 0
timeout: 5000ms
lettuce:
pool:
max-active: 8
max-wait: -1ms
max-idle: 8
min-idle: 0
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/school_news?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
username: root
password: root
hikari:
maximum-pool-size: 20
minimum-idle: 5
# 认证配置
school-news:
auth:
# JWT配置
jwt-secret: schoolNewsSecretKeyForJWT2025SecureEnough
jwt-expiration: 86400 # 24小时
# 安全配置
max-login-attempts: 5
lockout-duration: 30 # 锁定30分钟
# 免登录白名单
white-list:
- "/auth/login"
- "/auth/logout"
- "/auth/captcha"
- "/auth/health"
- "/actuator/**"
- "/swagger-ui/**"
- "/v3/api-docs/**"
- "/favicon.ico"
- "/error"
- "/public/**"
- "/static/**"
# 日志配置使用log4j2配置文件
logging:
config: classpath:log4j2-spring.xml
# 管理端点配置
management:
endpoints:
web:
exposure:
include: health,info,metrics
endpoint:
health:
show-details: when-authorized
# 文档配置
springdoc:
api-docs:
path: /v3/api-docs
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha
operations-sorter: alpha