spring:
  profiles:
    active: default

---
server:
  port: 45680

jwt:
  generate-key-pair-every-time: false
  expire: 24h
#  publicCacheKey: jwt-public
#  privateCacheKey: jwt-paivate

spring:
  h2:
    console:
      enabled: false
  data:
    redis:
      database: 0
      host: 10.10.10.200
      port: 16379
      password: 12341234
      jedis:
        pool:
          min-idle: 0
          max-active: 8
          max-idle: 8
          max-wait: -1ms
      connect-timeout: 30000ms

  shardingsphere:
    props:
      sql-simple: false
      sql-show: true
    datasource:
      names: ds
      ds:
        #        type: com.zaxxer.hikari.HikariDataSource
        type: com.alibaba.druid.pool.DruidDataSource
        driver-class-name: com.mysql.cj.jdbc.Driver
        username: root
        password: 12341234
        url: jdbc:mysql://10.10.10.200:3306/matrix_v2?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
    #        jdbc-url: jdbc:mysql://10.10.10.100:3306/matrix?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai

    rules:
      sharding:
        #        tables:
        #          user:
        #            actual-data-nodes: ds.user_$->{0..2}
        #            table-strategy:
        #              standard:
        #                sharding-column: id
        #                sharding-algorithm-name: user-id
        auto-tables:
          user:
            actual-data-sources: ds
            sharding-strategy:
              standard:
                sharding-column: id
                sharding-algorithm-name: general-id
          casbin_rule:
            actual-data-sources: ds
            sharding-strategy:
              standard:
                sharding-column: id
                sharding-algorithm-name: general-id
          location_record:
            actual-data-sources: ds
            sharding-strategy:
              standard:
                sharding-column: id
                sharding-algorithm-name: general-id
        sharding-algorithms:
          general-id:
            #            内置分片算法
            type: MOD
            props:
              sharding-count: 3
  config:
    activate:
      on-profile: default
#            行内表达式
#            type: INLINE
#            props:
#              algorithm-expression: user_$->{id % 3}
#    mode:
#      type: Standalone
casbin:
  enable-casbin: true
  auto-save: true
  initializeSchema: create
  storeType: jdbc
  model: classpath:casbin/model.conf

springdoc:
  api-docs:
    #    path: /api/docs
    #  在线文档JSON格式数据
    enabled: true
    groups:
      enabled: true
  swagger-ui:
    #  在线 Swagger UI
    enabled: true
    # 默认访问路径 /swagger-ui.html
    #    path: /swagger-ui.html
    #    layout: BaseLayout
    doc-expansion: list
    layout: StandaloneLayout
    filter: true
