| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- server:
- port: 8080
- servlet:
- context-path: /
- spring:
- application:
- name: ir-backend
- # 多应用部署时关闭依赖 JMX 的 MBean 冲突(东方通常见问题)
- jmx:
- enabled: false
- jackson:
- date-format: yyyy-MM-dd HH:mm:ss
- time-zone: GMT+8
- # 自定义:数据源配置(通过 type 切换:sqlite / mysql …)
- ir:
- datasource:
- type: sqlite
- sqlite:
- # 数据库文件路径,相对工作目录(也可写绝对路径)
- path: data/ir.db
- mysql:
- url: jdbc:mysql://localhost:3306/ir?useUnicode=true&characterEncoding=utf8&useSSL=false
- username: root
- password: root
- # 鉴权配置(用户注册/登录,JWT 无状态鉴权)
- auth:
- jwt:
- # HMAC 密钥,至少 32 字节;生产务必通过环境变量注入,勿写死
- secret: touyan-default-secret-please-change-in-production-256bit
- # Token 有效期(秒),默认 2 小时
- expiration-seconds: 7200
- header: Authorization
- prefix: "Bearer "
- # 无需登录即可访问的路径
- skip-paths:
- - /api/auth/login
- - /api/auth/register
- - /api/datasource/info
- logging:
- level:
- com.nylc.touyan: info
|