# 端口
server:
  port: 8000
# socketIo
socketio:
  port: 9191
# 多环境配置
spring:
  profiles:
    active: dev

  application:
    name: server

  # 连接池配置
  datasource:
    druid:
      initial-size: 5
      min-idle: 5
      max-active: 20
      max-wait: 30000
      time-between-eviction-runs-millis: 60000
      min-evictable-idle-time-millis: 300000
      test-while-idle: true
      test-on-borrow: true
      test-on-return: false
      remove-abandoned: true
      remove-abandoned-timeout: 1800
      #pool-prepared-statements: false
      #max-pool-prepared-statement-per-connection-size: 20
      filters: stat, wall
      validation-query: SELECT 'x'
      aop-patterns: com.gxwebsoft.*.*.service.*
      stat-view-servlet:
        url-pattern: /druid/*
        reset-enable: true
        login-username: admin
        login-password: admin

  # json时间格式设置
  jackson:
    time-zone: GMT+8
    date-format: yyyy-MM-dd HH:mm:ss
    serialization:
      write-dates-as-timestamps: false
      write-date-timestamps-as-nanoseconds: false
    deserialization:
      read-date-timestamps-as-nanoseconds: false

  # 设置上传文件大小
  servlet:
    multipart:
      max-file-size: 500MB
      max-request-size: 500MB
  redis:
    database: 0
    host: 1Panel-redis-Q1LE
    port: 6379
    password: redis_WSDb88

  # 邮件服务器配置
  mail:
    host: smtp.qq.com
    username: 170083662@qq.com
    password: mnfokualhfaucaie
    default-encoding: UTF-8
    properties:
      mail:
        smtp:
          auth: true
          socketFactory:
            class: javax.net.ssl.SSLSocketFactory
            port: 465

# Mybatis-plus配置
mybatis-plus:
  mapper-locations: classpath*:com/gxwebsoft/**/*Mapper.xml
  configuration:
    map-underscore-to-camel-case: true
    cache-enabled: true
  global-config:
    :banner: false
    db-config:
      id-type: auto
      logic-delete-value: 1
      logic-not-delete-value: 0

# 框架配置
config:
  open-office-home: C:/OpenOffice4/
  swagger-base-package: com.gxwebsoft
  swagger-title: 网宿软件 API文档
  swagger-description: websoft - 基于java spring、vue3、antd构建的前后端分离快速开发框架
  swagger-version: 2.0
  token-key: WLgNsWJ8rPjRtnjzX/Gx2RGS80Kwnm/ZeLbvIL+NrBs=
  server-url: https://server.websoft.top/api
  file-server: https://file.websoft.top
  upload-path: /Users/gxwebsoft/Documents/uploads
  local-upload-path: /Users/gxwebsoft/Documents/uploads

  # 阿里云OSS云存储
  endpoint: https://oss-cn-shenzhen.aliyuncs.com
  accessKeyId: LTAI5tGXuJku8MK7TA6gQMZw
  accessKeySecret: rimTK5ldtCtNZ9V9S5np6JToJtYuh2
  bucketName: oss-gxwebsoft
  bucketDomain: https://oss.wsdns.cn
  aliyunDomain: https://oss-gxwebsoft.oss-cn-shenzhen.aliyuncs.com

  # JWT配置
  jwt:
    secret: websoft-jwt-secret-key-2025-dev-environment
    expire: 86400  # token过期时间(秒) 24小时

# 证书配置
certificate:
  # 证书加载模式: CLASSPATH, FILESYSTEM, VOLUME
  load-mode: CLASSPATH
  # Docker挂载卷证书路径
  cert-root-path: /app/certs
  # 开发环境证书路径前缀
  dev-cert-path: certs/dev

  # 微信支付证书配置
  wechat-pay:
    dev:
      api-v3-key: "zGufUcqa7ovgxRL0kF5OlPr482EZwtn9"
      private-key-file: "apiclient_key.pem"
      apiclient-cert-file: "apiclient_cert.pem"
      wechatpay-cert-file: "wechatpay_cert.pem"
    prod-base-path: "/file"
    cert-dir: "wechat"

  # 支付宝证书配置
  alipay:
    cert-dir: "alipay"
    app-private-key-file: "app_private_key.pem"
    app-cert-public-key-file: "appCertPublicKey.crt"
    alipay-cert-public-key-file: "alipayCertPublicKey.crt"
    alipay-root-cert-file: "alipayRootCert.crt"

