server:
  servlet:
    context-path: /zion
  port: 8083
  tomcat:
    uri-encoding: utf-8
spring:
  servlet:
    multipart:
      max-file-size: 300MB
      max-request-size: 350MB
  # http配置，编码格式utf-8 HttpMessageConverter换为 Gson 速度稍慢但是稳定
  # 如果使用了 swagger 那么会有兼容问题 需要在 WebMvcConfig 处理
  http:
    encoding:
      force: true
      charset: utf-8
      enabled: true
    converters:
      preferred-json-mappe
  gson:
    date-format: yyyy-MM-dd HH:mm:ss
    serialize-nulls: true
  redis:
    #Redis数据库分片索引（默认为0）
    database: 0
    #    host: 192.168.1.211
    host: 127.0.0.1
    port: 6379
    password:

  #分页工具
  pagehelper:
    helperDialect: mysql
    reasonable: true
    supportMethodsArguments: true
    params: count=countSql
  datasource:
    druid:
      # 数据库访问配置, 使用druid数据源
      # 数据源1 mysql
      mysql:
        type: com.alibaba.druid.pool.DruidDataSource
        driver-class-name: com.mysql.cj.jdbc.Driver
        #        测试环境
        #        url: jdbc:mysql://47.106.242.175:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
        #        username: root
        #        password: diaoyun666
        url: jdbc:mysql://47.106.242.175:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
        username: root
        password: diaoyun666

      # 连接池配置
      initial-size: 5
      min-idle: 5
      max-active: 20
      # 连接等待超时时间
      max-wait: 30000
      # 配置检测可以关闭的空闲连接间隔时间
      time-between-eviction-runs-millis: 60000
      # 配置连接在池中的最小生存时间
      min-evictable-idle-time-millis: 300000
      validation-query: select '1' from dual
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false
      # 打开PSCache，并且指定每个连接上PSCache的大小
      pool-prepared-statements: true
      max-open-prepared-statements: 20
      max-pool-prepared-statement-per-connection-size: 20
      # 配置监控统计拦截的filters, 去掉后监控界面sql无法统计, 'wall'用于防火墙
      filters: stat,wall
      # Spring监控AOP切入点，如x.y.z.service.*,配置多个英文逗号分隔
      aop-patterns: com.springboot.servie.*


      # WebStatFilter配置
      web-stat-filter:
        enabled: true
        # 添加过滤规则
        url-pattern: /*
        # 忽略过滤的格式
        exclusions: '*.js,*.mp4,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'

      # StatViewServlet配置
      stat-view-servlet:
        enabled: true
        # 访问路径为/druid时，跳转到StatViewServlet
        url-pattern: /druid/*
        # 是否能够重置数据
        reset-enable: false
        # 需要账号密码才能访问控制台
        login-username: root
        login-password: 1234
        # IP白名单
        # allow: 127.0.0.1
        #　IP黑名单（共同存在时，deny优先于allow）
        # deny: 192.168.1.218

      # 配置StatFilter
      filter:
        stat:
          log-slow-sql: true
security:
  jwt:
    token:
      secret-key: secret-key
      expire-length: 60480000000 # one week 604800000 or 300000 5 minutes duration by default: 5 minutes * 60 seconds * 1000 miliseconds


