# spring配置
spring:
  datasource:
    druid:
      stat-view-servlet:
        enabled: true
        loginUsername: limap
        loginPassword: 123456
    dynamic:
      druid:
        initial-size: 5
        min-idle: 5
        maxActive: 20
        maxWait: 60000
        timeBetweenEvictionRunsMillis: 60000
        minEvictableIdleTimeMillis: 300000
        validationQuery: SELECT version()
        testWhileIdle: true
        testOnBorrow: false
        testOnReturn: false
        poolPreparedStatements: true
        maxPoolPreparedStatementPerConnectionSize: 20
        filters: stat,slf4j
        ## connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
        connectionProperties:
          druid:
            stat:
              mergeSql: true
              slowSqlMillis: 5000
      datasource:
        # 主库数据源
        master:
          driver-class-name:  com.mysql.cj.jdbc.Driver
          #            url: jdbc:mysql://36.139.89.250:13306/work?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=CONVERT_TO_NULL&transformedBitIsBoolean=true&useSSL=false&serverTimezone=Asia/Shanghai
          #            username: zhangsan
          #            password: '%qLUNmRr!4'
          url: jdbc:mysql://172.16.42.181:33306/fishery_dms_prod?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=CONVERT_TO_NULL&transformedBitIsBoolean=true&useSSL=false&serverTimezone=Asia/Shanghai
          username: root
          password: mT#SgaJNXQWSw2dt
        # 测试数据源
        # 使用方法，在 Mapper 类或者方法上增加注解 @DS("test") 用于切换数据源
        test:
          driverClassName: org.postgresql.Driver
          url: jdbc:postgresql://172.16.42.181:15432/fishery_prod?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
          username: postgres
          password: htYkSuRn7Gb*pbFn
        # 从库数据源 - TDengine
        taos:
          lazy: false
          # 强制使用 HikariCP 连接池，避免继承全局 Druid 配置
          type: com.zaxxer.hikari.HikariDataSource
          driverClassName: com.taosdata.jdbc.rs.RestfulDriver
          # 不指定数据库名，在 SQL 中使用完整路径 fishery.table_name
          url: jdbc:TAOS-RS://172.16.42.181:6041?timezone=Shanghai&charset=UTF-8&locale=en_US.UTF-8
          username: root
          password: intc@123456
          hikari:
            connection-timeout: 60000
            idle-timeout: 600000
            max-lifetime: 1800000
            maximum-pool-size: 5
            minimum-idle: 2
