spring:
  application:
    name: xdz-platform

  profiles:
    active: ${SPRING_PROFILES_ACTIVE:dev}  # 通过环境变量 SPRING_PROFILES_ACTIVE 切换，可选值：local, dev, prod，默认 dev

  main:
    allow-circular-references: true
    allow-bean-definition-overriding: true

  config:
    import:
      - optional:classpath:application-${spring.profiles.active}.yaml
      # - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置（暂时注释，本地开发不需要）

  servlet:
    multipart:
      max-file-size: 16MB
      max-request-size: 32MB

  jackson:
    serialization:
      write-dates-as-timestamps: true
      write-date-timestamps-as-nanoseconds: false
      write-durations-as-timestamps: true
      fail-on-empty-beans: false

  cache:
    type: REDIS
    redis:
      time-to-live: 1h

  data:
    redis:
      repositories:
        enabled: false

server:
  port: 18084

logging:
  file:
    name: ${user.home}/logs/${spring.application.name}.log

springdoc:
  api-docs:
    enabled: true
    path: /v3/api-docs
  swagger-ui:
    enabled: true
    path: /swagger-ui
  default-flat-param-object: true

knife4j:
  enable: true
  setting:
    language: zh_cn

mybatis-plus:
  configuration:
    map-underscore-to-camel-case: true
  global-config:
    db-config:
      id-type: NONE
      logic-delete-value: 1
      logic-not-delete-value: 0
    banner: false
  type-aliases-package: com.xindazhou.platform.dal.dataobject

--- #################### 新大洲相关配置 ####################

xdz:
  # API 访问日志配置
  access-log:
    enable: true # 是否启用 API 访问日志
    mode: log-only # 存储模式：log-only（默认，只记录日志文件）| direct（直接写数据库）

  info:
    version: 1.0.0
    base-package: com.xindazhou.platform
  web:
    admin-ui:
      url: http://localhost:8080
    cors:
      enabled: false
  security:
    oauth2-jwt:
      enabled: true
      public-key-path: classpath:jwt/oauth2_jwt_public_key.pem
  tenant:
    enable: false
  swagger:
    title: 平台服务
    description: 提供平台级服务功能（服务评价、维保管理等）
    version: ${xdz.info.version}
