server:
  port: 8080

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://mysql:3306/reading_platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
    username: root
    password: reading_platform_pwd
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: Asia/Shanghai
    serialization:
      write-dates-as-timestamps: false
  servlet:
    multipart:
      max-file-size: 300MB
      max-request-size: 1500MB
  web:
    resources:
      static-locations: file:/app/uploads/,classpath:/static/

  flyway:
    enabled: true
    locations: classpath:db/migration
    baseline-on-migrate: true
  data:
    redis:
      host: ${REDIS_HOST:redis}
      port: ${REDIS_PORT:6379}
      database: 0

jwt:
  secret: ${JWT_SECRET:reading-platform-jwt-secret-key-must-be-at-least-256-bits-long}
  expiration: 604800000

file:
  upload:
    path: /app/uploads/
    base-url: /uploads/

logging:
  level:
    com.reading.platform: info
