server:
  port: 48084

spring:
  application:
    name: asset-server

  # 允许 Bean 覆盖
  main:
    allow-bean-definition-overriding: true

  # 禁用 Nacos 配置中心
  cloud:
    nacos:
      config:
        enabled: false
        import-check:
          enabled: false

  # 数据源配置
  datasource:
    druid:
      url: jdbc:mysql://47.103.115.36:3306/oneos_asset?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
      username: root
      password: Passw0rd2026
      driver-class-name: com.mysql.cj.jdbc.Driver
      initial-size: 5
      min-idle: 5
      max-active: 20
      max-wait: 60000
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false

  # Redis 配置
  data:
    redis:
      host: 47.103.115.36
      port: 6379
      database: 0
      password: Passw0rd2026
      timeout: 10s
      lettuce:
        pool:
          max-active: 8
          max-idle: 8
          min-idle: 0
          max-wait: -1ms

# MyBatis Plus 配置
mybatis-plus:
  configuration:
    map-underscore-to-camel-case: true
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  global-config:
    db-config:
      id-type: auto
      logic-delete-field: deleted
      logic-delete-value: 1
      logic-not-delete-value: 0
  type-aliases-package: cn.iocoder.yudao.module.asset.dal.dataobject

# 日志配置
logging:
  level:
    root: INFO
    cn.iocoder.yudao.module.asset: DEBUG
    cn.iocoder.yudao.framework: INFO
  pattern:
    console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n'

# 芋道配置
yudao:
  info:
    version: 1.0.0
    base-package: cn.iocoder.yudao.module.asset
  web:
    admin-api:
      prefix: /admin-api
      controller: '**.controller.admin.**'
    admin-ui:
      url: http://localhost:3000
  security:
    permit-all_urls:
      - /admin-api/asset/parking/page
      - /admin-api/asset/parking/simple-list
      - /admin-api/asset/vehicle-model/page
      - /admin-api/asset/vehicle-model/simple-list
  xss:
    enable: false
  access-log:
    enable: true
  error-code:
    enable: true
  demo: false
  tenant:
    enable: false

# Swagger 配置
springdoc:
  api-docs:
    enabled: true
    path: /v3/api-docs
  swagger-ui:
    enabled: true
    path: /swagger-ui.html

knife4j:
  enable: true
  setting:
    language: zh_cn
