server:
  port: 8091

# ---------- 线程池 ----------
thread:
  pool:
    executor:
      config:
        core-pool-size: 20
        max-pool-size: 50
        keep-alive-time: 5000
        block-queue-size: 5000
        policy: CallerRunsPolicy

# ---------- 数据源 ----------
spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://mysql:3306/big_market?useUnicode=true&characterEncoding=utf8&autoReconnect=true&serverTimezone=Asia/Shanghai&useSSL=false
    username: root
    password: 123456
    hikari:
      pool-name: Retail_HikariCP
      minimum-idle: 15          # 最小空闲连接
      idle-timeout: 180000      # 空闲连接存活（ms）
      maximum-pool-size: 25     # 最大连接
      auto-commit: true
      max-lifetime: 1800000     # 连接最大生命周期（ms）
      connection-timeout: 30000
      connection-test-query: SELECT 1

# ---------- MyBatis ----------
mybatis:
  mapper-locations: classpath:/mybatis/mapper/*.xml
  config-location: classpath:/mybatis/config/mybatis-config.xml

# ---------- Redis ----------
redis:
  sdk:
    config:
      host: redis          # 使用服务名
      port: 6379
      pool-size: 10
      min-idle-size: 5
      idle-timeout: 30000
      connect-timeout: 5000
      retry-attempts: 3
      retry-interval: 1000
      ping-interval: 60000
      keep-alive: true

# ---------- 日志 ----------
logging:
  level:
    root: info
  config: classpath:logback-spring.xml
