spring:
  application:
    name: file-service
  
  servlet:
    multipart:
      enabled: true
      max-file-size: 100MB
      max-request-size: 100MB
  
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/school_news?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
    username: root
    password: root
    hikari:
      minimum-idle: 5
      maximum-pool-size: 20
      idle-timeout: 600000
      max-lifetime: 1800000
      connection-timeout: 30000

# MyBatis Plus配置
mybatis-plus:
  mapper-locations: classpath:mapper/*.xml
  type-aliases-package: org.xyzh.common.dto
  configuration:
    map-underscore-to-camel-case: true
    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
  global-config:
    db-config:
      id-type: assign_uuid
      logic-delete-field: deleted
      logic-delete-value: 1
      logic-not-delete-value: 0

# 文件存储配置
file:
  storage:
    # 默认存储类型
    default-type: local
    
    # 存储配置列表（只创建配置了的存储策略）
    storages:
      # 本地存储配置
      - type: local
        enabled: true
        base-path: ./uploads

      
      # MinIO存储配置（如不需要可以删除或设置enabled为false）
      # - type: minio
      #   enabled: true
      #   endpoint: http://localhost:9000
      #   access-key: minioadmin
      #   secret-key: minioadmin
      #   bucket-name: school-news
# 认证配置
school-news:
  auth:
    # 免登录白名单 - file模块
    white-list:
      - "/file/download/**"

