server:
   port: '@sam.server.port@'
   maxHttpHeaderSize: 102400000
   maxPostSize: 102400000
   error:
      whitelabel:
         enabled: false
   tomcat:
     max-threads: 200
     accept-count: 200
     max-connections: 100
     min-spare-threads: 4
     connection-timeout: 5000
     uri-encoding: UTF-8
     max-swallow-size: 100MB
     relaxedQueryChars: <,>, [,],^,`,{,|,}
   servlet:
      context-path: /
      session: 
         tracking-modes: cookie
         cookie:
            http-only: true
      timeout: 1
banner:
   charset: UTF-8
spring:
   main:
      banner-mode: "CONSOLE" # CONSOLE LOG OFF
   profiles:
      active: dev # prod dev
   application:
      name: ATV_Web服务器
   servlet:
      multipart:
        max-request-size: 200MB 
        max-file-size: 200MB
   messages:
        always-use-message-format: true
        cache-seconds: 3600
        encoding: UTF-8
        basename: config/i18n/messages
   freemarker:
      checkTemplateLocation: false
   mvc:
      pathMatch:
          matching-strategy: ant_path_matcher
      static-path-pattern: /static/**
      view:
         suffix: .html
         throw-exception-if-no-handler-found: true
   web:
        resources:
            add-mappings: false #关闭工程中的资源文件建立映射
        http:
            encoding:
                force: true
                charset: UTF-8
                enabled: true
   mail:
       host: '@sam.mail.host@'
       username: '@sam.mail.username@'
       password: '@sam.mail.password@'
       default-encoding: utf-8
       protocol: smtp
       properties:
          mail:
             smtp:
               connection-timeout: 5000
               timeout: 3000
               write-timeout: 5000
               auth: true
   #redis 配置
   redis:
       host: '@sam.redis.host@'
       password: '@sam.redis.password@'
       port: '@sam.redis.port@'
       database: 5
       lettuce:
          pool:
             max-active: 8   #最大连接数据库连接数,设 0 为没有限制
             max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
             max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
             min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
          shutdown-timeout: 100ms
   #RabbitMQ 的相关配置
   rabbitmq:
        host: '@sam.rabbitmq.host@'
        port: '@sam.rabbitmq.port@'
        username: '@sam.rabbitmq.username@'
        password: '@sam.rabbitmq.password@'
        virtual-host: '@sam.rabbitmq.virtual-host@'
        #异步消息回调publisher-confirms: true
        publisher-confirm-type: correlated
        listener:
          simple:
            prefetch: 2500
   influx:
       url: '@sam.influx.url@'
       user: '@sam.influx.user@'
       password: '@sam.influx.password@'
       database: '@sam.influx.database@'
       retentionPolicy: 
   sqltoy:
        debug: true
        sqlResourcesDir: classpath:config/sqltoy/
        translateConfig: classpath:config/sqltoy/dict-translate.xml
        printSqlTimeoutMillis: 300000
        defaultDataSource: dataSource
        # 提供统一字段:createBy createTime updateBy updateTime 等字段补漏性(为空时)赋值(可选配置)
        unifyFieldsHandler: cn.service.util.UnifyFieldsUtil
logging: # classpath:logback-spring.xml '@sam.logging.config@'
   config: '@sam.logging.config@'
   file:
      path: '@sam.logging.path@'
   level:
      root: INFO
      # org.springframework: TRACE  # 控制console显示信息等级
      # org.springframework.data.convert.CustomConversions: ERROR
      # org.springframework.security.web.DefaultSecurityFilterChain: ERROR
      com.zaxxer.hikari.HikariConfig: DEBUG
      com.zaxxer.hikari: TRACE
      org.quartz.core.QuartzScheduler: ERROR  # ERROR
      cn.report.template.poi.render.processor.DelegatePolicy: ERROR
      cn.report.template.poi.render.processor.LogProcessor: ERROR
jasypt:
    encryptor:
       bean: '@sam.jasypt.encryptor@'
    decrypt:
       url: '@sam.jasypt.decrypt@'
sam:
   logging:
      stdout: true # true输出STDOUT信息
   sftp:
      remoteHost: "remote_sftp_test"
      remotePort: 80
      remoteDir: "remote_sftp_test"
      username: "remote_sftp_test"
      password: "remote_sftp_test"
   udp: # UDP组播地址及端口
      groupAddress: '@sam.udp.groupAddress@'
      groupPort: '@sam.udp.groupPort@'
   dbName: '@sam.dbname@'
   datasource:
      primary:
         name: primary_DS
         driver-class-name: com.mysql.cj.jdbc.Driver
         password: '@sam.datasource.password@'
         username: '@sam.datasource.username@'
         url: '@sam.datasource.url@'
         type: com.zaxxer.hikari.HikariDataSource
         configuration:         
            #auto-commit: false
            pool-name: HikariCP_P
            connection-timeout: 600000
            maximum-pool-size: 5
            max-lifetime: 1800000
            minimum-idle: 5
            validation-timeout: 3000
            idle-timeout: 60000
            connection-test-query: SELECT 1 # 测试sql
      secondary:
         name: secondary_DS
         driver-class-name: com.mysql.cj.jdbc.Driver
         url: '@sam.secondary.datasource.url@'
         username: '@sam.secondary.datasource.username@'
         password: '@sam.secondary.datasource.password@'
         type: com.zaxxer.hikari.HikariDataSource
         configuration: 
             pool-name: HikariCP_S
             minimum-idle: 2
   response-body:
       base-package: cn.api
       raw-package: cn.api
   init: 
      db: # 初始化sql
         scheme: false
         data: false
   token:
      expireTime: 120
   #短信秘钥
   sms:
     accessKeyId: '@sam.sms.accessKeyId@'
     accessKeySecret: '@sam.sms.accessKeySecret@'
   sys: 
     version: 1.0.0 # 版本
     copyrightYear: 2021 # 版权年份
     hump-conversion: true #开启驼峰转换
     unify-fields: true # 默认字段赋值
     encoder: # 安全验证密码方式
     kaptchaType: math # 验证码类型 math 数组计算 char 字符验证
     addressEnabled: true # 获取ip地址开关
     aspect-log: false # true记录用户登录及操作信息到表中
     debug: TRUE # 用户请求是否输出到监控平台
     reposityLog: '@sam.sys.reposityLog@'
     reposityURI: '@sam.sys.reposityURI@'
   file:
      # 报表模板的位置 jar文件内部; 其他值外部
      reportTemplate:
      # 上传exce文件头标题所占行数
      excelHeadRowNum: 1
      uploadType: '@sam.file.uploadType@'
      serverURL: '@sam.file.serverURL@'
      urlPath: '@sam.file.urlPath@'
      realPath: '@sam.file.realPath@'
   #阿里云oss存储配置
   oss:
    endpoint: '@sam.oss.endpoint@'
    accessKey: '@sam.oss.accessKey@'
    secretKey: '@sam.oss.secretKey@'
    bucketName: '@sam.oss.bucketName@'
    staticDomain: '@sam.oss.staticDomain@'
   # minio文件上传
   minio:
    minio_url: '@sam.minio.minio_url@'
    minio_name: '@sam.minio.minio_name@'
    minio_pass: '@sam.minio.minio_pass@'
    bucketName: '@sam.minio.bucketName@'
