#服务器配置
server:
  port: 8800
  undertow:
    threads:
      # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
      io: 16
      # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
      worker: 400
    # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
    buffer-size: 1024
    # 是否分配的直接内存
    direct-buffers: true

spring:
  http:
    multipart:
      enabled: true
      file-size-threshold: 0
      max-file-size: 20MB
      max-request-size: 30MB
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    #driver-class-name: org.postgresql.Driver
    #driver-class-name: oracle.jdbc.OracleDriver
    #driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    druid:
      # MySql、PostgreSQL、SqlServer校验
      validation-query: select 1
      # Oracle校验
      #validation-query: select 1 from dual
      validation-query-timeout: 2000
      initial-size: 5
      max-active: 20
      min-idle: 5
      max-wait: 60000
      test-on-borrow: false
      test-on-return: false
      test-while-idle: true
      time-between-eviction-runs-millis: 60000
      min-evictable-idle-time-millis: 300000
      stat-view-servlet:
        enabled: true
        login-username: 18185837450
        login-password: 74500013
      web-stat-filter:
        enabled: true
        url-pattern: /*
        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
        session-stat-enable: true
        session-stat-max-count: 10

# mybatis
mybatis-plus:
  mapper-locations: classpath:org/springblade/**/mapper/*Mapper.xml
  #实体扫描，多个package用逗号或者分号分隔
  typeAliasesPackage: org.springblade.**.entity
  #typeEnumsPackage: org.springblade.dashboard.entity.enums
  global-config:
    # 关闭MP3.0自带的banner
    banner: false
    db-config:
      #主键类型  0:"数据库ID自增", 1:"不操作", 2:"用户输入ID",3:"数字型snowflake", 4:"全局唯一ID UUID", 5:"字符串型snowflake";
      id-type: assign_id
      #字段策略
      insert-strategy: not_null
      update-strategy: not_null
      select-strategy: not_empty
      #驼峰下划线转换
      table-underline: true
      # 逻辑删除配置
      # 逻辑删除全局值（1表示已删除，这也是Mybatis Plus的默认配置）
      logic-delete-value: 1
      # 逻辑未删除全局值（0表示未删除，这也是Mybatis Plus的默认配置）
      logic-not-delete-value: 0
  configuration:
    map-underscore-to-camel-case: true
    cache-enabled: false

#knife4j配置
knife4j:
  #启用
  enable: true
  #基础认证
  basic:
    enable: false
    username: blade
    password: blade
  #增强配置
  setting:
    enableSwaggerModels: true
    enableDocumentManage: true
    enableHost: false
    enableHostText: http://localhost
    enableRequestCache: true
    enableFilterMultipartApis: false
    enableFilterMultipartApiMethodType: POST
    language: zh-CN
    enableFooter: false
    enableFooterCustom: true
    footerCustomContent: Copyright © 2021 BladeX All Rights Reserved

#swagger公共信息
swagger:
  title: Consignx 接口文档系统
  description: Consignx 接口文档系统
  version: 2.9.0.RELEASE
  license: xuwei
  license-url:
  terms-of-service-url:
  contact:
    name: xuwei
    email: xuweidyx@163.com
    url: https://gitee.com/x-t1/bladex-boot

# 短信配置
sms:
  enabled: true
  name: aliyun
  sign-name: liquor
#  template-id: SMS_97910018
#  access-key: LTAI4GCNRML2EpFZxBWakWSc
#  secret-key: 8u1spjDrT1hD2OaN9DS8NasSHipDfO
  template-id: SMS_243346641
  access-key: LTAI5tQJaGbQkJn5tqwot8gm
  secret-key: 59m2lXM2kDA1l2FRJ56VS5J1iNt9kC
# 用于发送短信的支付宝配置
  region-id: cn-hangzhou
  access-key-id: LTAI5tJkrXAxPJnQdaQX6ZZX
  access-key-secret: cI9X9pjjcKavsEXfbf5QFeElAoklHd
# 检测到数据异常时接收通知短信的号码
  message-phone: 18786650887
#第三方登陆配置
social:
  oauth:
    GITHUB:
      client-id: 233************
      client-secret: 233************************************
      redirect-uri: ${social.domain}/oauth/redirect/github
    GITEE:
      client-id: 233************
      client-secret: 233************************************
      redirect-uri: ${social.domain}/oauth/redirect/gitee
    WECHAT_OPEN:
      client-id: 233************
      client-secret: 233************************************
      redirect-uri: ${social.domain}/oauth/redirect/wechat
    QQ:
      client-id: 233************
      client-secret: 233************************************
      redirect-uri: ${social.domain}/oauth/redirect/qq
    DINGTALK:
      client-id: 233************
      client-secret: 233************************************
      redirect-uri: ${social.domain}/oauth/redirect/dingtalk

#blade配置
blade:
  #token配置
  token:
    #是否有状态
    state: false
  #redis序列化方式
  redis:
    serializer-type: protostuff
  #接口配置
  api:
    #报文加密配置
    crypto:
      #启用报文加密配置
      enabled: false
      #使用AesUtil.genAesKey()生成
      aes-key: O2BEeIv399qHQNhD6aGW8R8DEj4bqHXm
      #使用DesUtil.genDesKey()生成
      des-key: jMVCBsFGDQr1USHo
  #jackson配置
  jackson:
    #null自动转空值
    null-to-empty: true
    #大数字自动转字符串
    big-num-to-string: true
    #支持text文本请求,与报文加密同时开启
    support-text-plain: false
  #xss配置
  xss:
    enabled: true
    skip-url:
      - /blade-chat/weixin
      - /blade-desk/notice/submit
  #安全框架配置
  secure:
    #接口放行
    skip-url:
      - /blade-test/**
      - /v1/user-register
      - /v1/login_account
      - /v1/login/wx-auth
      - /v1/login_phone
      - /v1/reset_password
      - /v1/common/send-validate
      - /v1/aliPay/sdk/auth_notify_url # 预授权拦截
      - /v1/aliPay/sdk/new_auth_notify_url # 预授权拦截
      - /v1/aliPay/sdk/trade_notify_url # 支付回调
      - /v1/aliPay/sdk/order_notify_url # 支付回调
      - /v1/balance/recharge_url # 充值回调
      - /v1/aliPay/sdk/platform_authorization_notify_url
      - /v1/aliPay/sdk/cart_order_notify_url # 购物车支付回调
      - /v1/versionUpgrade
      - /v1/re/goodsInfo/page
      - /v1/re/goodsInfo/detail
      - /v1/file/uploadErrLog
      - /v1/wxPay/v3/payNotify
      - /v1/wxPay/v3/payNotify/cart
      - /v1/wxPay/v3/refundNotify
      - /finance/order/linkedOrder/addByExcel
      - /v1/aliPay/zhzx/callback
      - /v1/aliPay/zhzx/callback/cart
    #授权认证配置
    auth:
      - method: ALL
        pattern: /blade-chat/weixin/**
        expression: "hasAuth()"
      - method: POST
        pattern: /blade-desk/dashboard/upload
        expression: "hasTimeAuth(9, 17)"
      - method: POST
        pattern: /blade-desk/dashboard/submit
        expression: "hasAnyRole('administrator', 'admin', 'user')"
    #基础认证配置
    basic:
      - method: ALL
        pattern: /blade-desk/dashboard/info
        username: "blade"
        password: "blade"
    #动态签名认证配置
    sign:
      - method: ALL
        pattern: /blade-desk/dashboard/sign
        crypto: "sha1"
    #多终端认证配置
    client:
      - client-id: sword
        path-patterns:
          - /blade-sword/**
      - client-id: saber
        path-patterns:
          - /blade-saber/**
  #多租户配置
  tenant:
    #多租户增强
    enhance: true
    #多租户授权保护
    license: false
    #动态数据源功能
    dynamic-datasource: false
    #动态数据源全局扫描
    dynamic-global: false
    #多租户字段名
    column: tenant_id
    #排除多租户逻辑
    exclude-tables:
      - blade_user

supply:
  chain:
    host: http://api.jxhh.com
    appKey: 3646BE2E163B42397592DB6CE007E747176081652417532
    secretKey: C4CF11DDD1EB99E829BEE1DEBECEB782


