# H2数据库配置（用于测试环境）

spring:
  r2dbc:
    url: r2dbc:h2:mem:///testdb
    username: sa
    password: 
    pool:
      initial-size: 5
      max-size: 20
      max-idle-time: 30m
      max-life-time: 1h
      acquire-timeout: 5s
  
  datasource:
    url: jdbc:h2:mem:testdb
    username: sa
    password: 
    driver-class-name: org.h2.Driver
  
  h2:
    console:
      enabled: true
      path: /h2-console
      settings:
        web-allow-others: true
  
  flyway:
    enabled: false
  
  sql:
    init:
      mode: always
      continue-on-error: true

# 测试专用配置
test:
  database:
    type: h2
    in-memory: true
  cleanup:
    enabled: true
    strategy: truncate

# 日志配置
logging:
  level:
    cn.novalon.manage: DEBUG
    org.springframework.r2dbc: DEBUG
    org.springframework.jdbc: DEBUG
    org.flywaydb: INFO
    com.h2database: WARN
