server:
  port: 18080
  shutdown: graceful
  netty:
    connection-timeout: 5s
  error:
    include-message: always
    include-binding-errors: always
    include-stacktrace: on-param
    include-exception: true

spring:
  application:
    name: ai-novel-server
  data:
    mongodb:
      uri: mongodb://localhost:27017/ainoval?
      auto-index-creation: true
      database: ainovel
      authentication-database: admin
  webflux:
    base-path: /
  lifecycle:
    timeout-per-shutdown-phase: 30s

logging:
  level:
    root: INFO
    com.ainovel: DEBUG
    # 添加MongoDB查询日志配置
    org.springframework.data.mongodb: DEBUG
    org.springframework.data.mongodb.core.ReactiveMongoTemplate: DEBUG
    org.springframework.data.mongodb.core.MongoTemplate: DEBUG
    org.springframework.data.mongodb.repository.query: DEBUG
    org.springframework.web: DEBUG
    org.springframework.security: DEBUG
    reactor.netty: DEBUG

management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics,prometheus
  endpoint:
    health:
      show-details: always
  # 更新过时的配置
  prometheus:
    metrics:
      export:
        enabled: true
  metrics:
    tags:
      application: ${spring.application.name}

# 自定义配置
ainovel:
  security:
    jwt:
      secret-key: test_secret_key_for_performance_testing
      expiration-time: 86400000  # 24小时，单位毫秒
      refresh-token-expiration: 604800000  # 7天，单位毫秒
  performance:
    virtual-threads:
      enabled: true
    monitoring:
      enabled: true
    testing:
      security-disabled: true  # 禁用安全验证，方便测试
  # 添加MongoDB查询日志配置
  mongodb:
    logging:
      enabled: true
      query-level: DEBUG
      result-count: true

# 禁用JWT验证，方便测试
security:
  jwt:
    disabled: true