application-test.yml 3.87 KB
mybatis-plus:
  configuration:
    cache-enabled: false
    call-setters-on-nulls: true
    jdbc-type-for-null: 'null'
    map-underscore-to-camel-case: true
    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
  global-config:
    db-config:
      capital-mode: false
      field-strategy: NOT_NULL
      id-type: AUTO
      logic-delete-field: enable_flag
      logic-delete-value: 20
      logic-not-delete-value: 10
  mapper-locations: classpath:/mapper/**.xml
  type-aliases-package: com.canrd.shop.**.dto
#spring:
#  datasource:
#    dynamic:
#      primary: overtime #设置默认的数据源或者数据源组,默认值即为master
#      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候会抛出异常,不启动则使用默认数据源.
#      datasource:
#        wms_warehouse:
#          url: jdbc:mysql://127.0.0.1:3306/overtime?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10&allowMultiQueries=true&useAffectedRows=true&autoReconnectForPools=true&rewriteBatchedStatements=true
#          username: root
#          password: root
#          driver-class-name: com.mysql.cj.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
#          druid:
#            initial-size: 5
#            max-active: 20
#            max-evictable-idle-time-millis: 300000
#            max-wait: 60000
#            min-evictable-idle-time-millis: 300000
#            min-idle: 5
#            time-between-eviction-runs-millis: 60000
#    type: com.alibaba.druid.pool.DruidDataSource
spring:
  servlet:
    multipart:
      enabled: true
      max-file-size: 100MB
      max-request-size: 20MB
      file-size-threshold: 20MB
  datasource:
    db-type: com.alibaba.druid.pool.DruidDataSource
    driverClassName: com.mysql.cj.jdbc.Driver
    initial-size: 5
    max-active: 30
    max-wait: 30000
    min-idle: 5
    #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
    timeBetweenEvictionRunsMillis: 30000
    #配置一个连接在池中最小生存的时间,单位是毫秒,30000=30s
    minEvictableIdleTimeMillis: 30000
    validationQuery: SELECT 'x'
    testWhileIdle: true
    testOnBorrow: true
    testOnReturn: true
    password: 123456
    time-between-eviction-runs-millis: 1000
    url: jdbc:mysql://159.75.211.11:3306/canrd?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10&allowMultiQueries=true&useAffectedRows=true&autoReconnectForPools=true
    username: root
  redis:
    database: 3
    host: 159.75.211.11
    lettuce:
      pool:
        max-active: 2000
        max-idle: 10
        max-wait: -1
        min-idle: 3
        time-between-eviction-runs: 100
    password: ''
    port: 6379
    timeout: 2000


logging:
  config: classpath:log4j2-dev.xml

#spring security相关配置
#security:
#  token:
#    header: Authorization
#    expireTime: 30
#  permitAllUrls: /api/overtime/account/login,/api/overtime/account/logout,/api/overtime/sms/send_auth_code,/api/overtime/account/reset_password,/admin/shop/test/add,/admin/shop/test/demo


#jwt
jwt:
  header: Authorization
  # 令牌前缀
  token-start-with: Bearer
  # 必须使用最少88位的Base64对该令牌进行编码
  base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI=
  # 令牌过期时间 此处单位/毫秒 ,默认2小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html
  token-validity-in-seconds: 7200000
  # 在线用户key
  online-key: online-token
  # 验证码
  code-key: code-key