# Spring配置
spring:
  # 模板引擎
  thymeleaf:
    mode: HTML
    encoding: utf-8
    # 禁用缓存
    cache: false
  # 资源信息
  messages:
    # 国际化资源文件路径
    basename: static/i18n/messages
  jackson:
    time-zone: GMT+8
    date-format: yyyy-MM-dd HH:mm:ss
    generator:
      write_numbers_as_strings: true
  # 文件上传
  servlet:
    multipart:
      # 单个文件大小
      max-file-size: 10MB
      # 设置总上传的文件大小
      max-request-size: 20MB
  # 服务模块
  devtools:
    restart:
      # 热部署开关
      enabled: true
  # 数据源配置
  datasource:
    dynamic:
      primary: master
      datasource:
        master:
          url: jdbc:mysql://localhost:3306/bs-jxc-dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
          username: root
          password: root
          driverClassName: com.mysql.cj.jdbc.Driver
      # 初始连接数
      initialSize: 5
      # 最小连接池数量
      minIdle: 10
      # 最大连接池数量
      maxActive: 20
      # 配置获取连接等待超时的时间
      maxWait: 60000
      # 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒
      timeBetweenEvictionRunsMillis: 60000
      # 配置一个连接在池中最小生存的时间，单位是毫秒
      minEvictableIdleTimeMillis: 300000
      # 配置一个连接在池中最大生存的时间，单位是毫秒
      maxEvictableIdleTimeMillis: 900000
      # 配置检测连接是否有效
      validationQuery: SELECT 'x'
      testWhileIdle: true
      testOnBorrow: false
      testOnReturn: false
      webStatFilter:
        enabled: true
      statViewServlet:
        enabled: true
        # 设置白名单，不填则允许所有访问
        allow:
        url-pattern: /druid/*
        # 控制台管理用户名和密码
        login-username: ruoyi
        login-password: 123456
      filter:
        stat:
          enabled: true
          # 慢SQL记录
          log-slow-sql: true
          slow-sql-millis: 1000
          merge-sql: true
        wall:
          config:
            multi-statement-allow: true
# MyBatis
#mybatis:
#    # 搜索指定包别名
#    typeAliasesPackage: com.ruoyi.project.**.domain
#    # 配置mapper的扫描，找到所有的mapper.xml映射文件
#    mapperLocations: classpath:mybatis/**/*Mapper.xml
#    # 加载全局的配置文件
#    configLocation: classpath:mybatis/mybatis-config.xml

mybatis-plus:
  mapper-locations: classpath*:mybatis/**/*Mapper.xml
  type-aliases-package: com.data.emqx
  global-config:
    banner: false
    db-config:
      id-type:
      logic-delete-field: del_flag
      logic-delete-value: 2
      logic-not-delete-value: 0
      update-strategy: not_null
    #原生配置
  configuration:
    map-underscore-to-camel-case: true
    cache-enabled: false
    call-setters-on-nulls: true
    jdbc-type-for-null: 'null'

# PageHelper分页插件
pagehelper:
  reasonable: true
  autoRuntimeDialect: true
  supportMethodsArguments: true
  params: count=countSql
bs:
  tenant:
    #开启租户
    openTenant: true
emqx:
  username: "test"
  password: "test"
  broker: "tcp://127.0.0.1:1883"
  clientid: "emqx_clientid"
  subscriptiontopic: "emqx_topic"
  qos: 1
  pubTopic: "emqx_topic_return"