2025-09-28 15:50:59 +08:00
|
|
|
|
server:
|
|
|
|
|
|
port: 8081
|
|
|
|
|
|
|
|
|
|
|
|
spring:
|
|
|
|
|
|
application:
|
|
|
|
|
|
name: school-news-auth
|
|
|
|
|
|
|
2025-10-06 16:20:05 +08:00
|
|
|
|
# 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
|
|
|
|
|
|
|
2025-09-28 15:50:59 +08:00
|
|
|
|
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
|