64 lines
1.3 KiB
YAML
64 lines
1.3 KiB
YAML
|
|
server:
|
|||
|
|
port: 8081
|
|||
|
|
|
|||
|
|
spring:
|
|||
|
|
application:
|
|||
|
|
name: school-news-auth
|
|||
|
|
|
|||
|
|
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
|