application.yml 5.94 KB
server:
  port: 19210
monitor:
  log-white:
#服务全局名称
spring:
  application:
    name: ms-data-circulation-portal-service
  jackson:
    time-zone: Asia/Shanghai
  cloud:
    inetutils:
      ignored-interfaces: docker0  # 让应用忽略docker0网卡
    compatibility-verifier:
      enabled: false
    gateway:
      gatewayServiceName: gateway-server
      host: 114.115.131.96
  kafka:
    bootstrap-servers: kafka-cs-develop.daop:9092
    producer:
      retries: 3
  main:
    allow-bean-definition-overriding: true
  datasource:
    sql-script-encoding: utf-8
    #type: org.apache.commons.dbcp2.BasicDataSource
    #如果使用TCC事务这个type必须指定,否则会抛出: org.springframework.jdbc.CannotGetJdbcConnectionException:  Failed  to  obtain  JDBC  Connection;
    dynamic:
      primary: master
      druid:
        initial-size: 0
        max-active: 50
        min-idle: 2
        max-wait: -1
        min-evictable-idle-time-millis: 30000
        max-evictable-idle-time-millis: 30000
        time-between-eviction-runs-millis: 0
        validation-query: select 1
        validation-query-timeout: -1
        test-on-borrow: false
        test-on-return: false
        test-while-idle: true
        pool-prepared-statements: true
        #        max-open-prepared-statements: 100
        filters: stat,wall
        share-prepared-statements: true
        wall:
          config:
            condition-double-const-allow: true
            condition-and-alway-true-allow: true
      ##由mycat管理读写分离 不用代码控制(填写mycat的链接库)
      datasource:
        master:
          url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
          username: prg
          password: E5t391s349wT@3
          driver-class-name: com.mysql.cj.jdbc.Driver
          druid:
            initial-size: 5
        slave:
          url: jdbc:mysql://192.168.6.21:3307/csbr_data_circulation_portal?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai&connectTimeout=60000&socketTimeout=60000
          username: prg
          password: E5t391s349wT@3
          driver-class-name: com.mysql.cj.jdbc.Driver
          druid:
            initial-size: 5
  # redis配置
  data:
    redis:
      # 集群
      #cluster:
      #  nodes: redis-service.redis:6379
      # 单节点
      host: redis-service.daop
      port: 6379
      password: "J7e411m693cA9"
      timeout: 1000
      prefix: daop-test
      jedis:
        pool:
          max-idle: 8
          max-wait: 2000
          min-idle: 0
          max-active: 100
          test-on-borrow: true
          test-while-idle: true
    sql:
      init:
        schema-locations: classpath*:init.sql
        encoding: UTF-8
        mode: never
redisson:
  address: redis://redis-service.daop:6379
  password: "J7e411m693cA9"

seata:
  enabled: true # 1.0新特性,需要依赖seata-spring-boot-starter,默认为true
  tx-service-group: my_test_tx_group
  application-id: ms-data-circulation-portal-service
  registry:
    type: nacos
    nacos:
      application: seata-server
      cluster: seata-cluster
      server-addr: nacos-cluster-service-develop.nacos-cluster:8848
      password: U9u457p155vH@8
      username: nacos
      namespace: daop-lt
      group: test
  service:
    vgroupMapping:
      my_test_tx_group: seata-cluster
    grouplist:
      default: ms-daop-seata-service-test:8091

#数据库字段开启驼峰
mybatis:
  configuration:
    map-underscore-to-camel-case: true
    callSettersOnNulls: true
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mybatis-plus:
  global-config:
    db-config:
      id-type: ASSIGN_UUID
      logic-delete-value: "null"
      logic-not-delete-value: N
  mapper-locations: classpath*:mapper/**/*Mapper.xml
  type-aliases-package: com.csbr.qingcloud.configure.mybatis
  ##生产环境屏蔽此配置 优化性能
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
pagehelper:
  helperDialect: mysql
  reasonable: true
  supportMethodsArguments: true
  params: count=countSql

csbr:
  kafka:
    topic-prefix: DAOP-LT-TEST
    consumer:
      # 开启kafka消费者
      enable: true
      # kafka 服务集群地址,格式:HOST:PORT ,用逗号隔开
      #      bootstrap-servers: 210.12.100.201:9092
      bootstrap-servers: kafka-cs-develop.daop:9092
      #      bootstrap-servers: 192.168.3.120:9092
      # 是否启用自动提交 offset
      enable-auto-commit: false
      # 自动提交间隔时间(MS),仅在自动提交开启时有效
      auto-commit-interval: 100
      # 自动重置 offset。 latest:从最后开始,earliest: 从 offset 为 0 开始
      auto-offset-reset: latest
      # 消息 key 的反序列化方法
      key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
      # 消息 value 的反序列化方法
      value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
      # listener 开启的线程数
      concurrency: 2
      # session 超时时间
      session-timeout: 60000
      # 最大 poll 消息间隔时间,如果处理时间过长会导致异常
      max-poll-interval: 10000
      # 最大 poll 消息数量
      max-poll-records: 2
    producer:
      # 开启kafka生产者
      enable: true
      # kafka 服务集群地址,格式:HOST:PORT ,多地址用逗号隔开
      #      bootstrap-servers: 210.12.100.201:9092
      bootstrap-servers: kafka-cs-develop.daop:9092
      #      bootstrap-servers: 192.168.3.120:9092
      # 失败后的重发次数
      retries: 0
      # 一次最多发送的数据量
      batch-size: 4096
      # 32M批处理缓冲区
      buffer-memory: 33554432
      # 生产者生产消息间隔,数值越大,间隔越长,用来减缓消费压力
      linger: 1
feign:
  hystrix:
    enabled: false

query-limit:
  white: TrTaskValid