application.yml
5.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
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-master
      group: test
  service:
    vgroupMapping:
      my_test_tx_group: seata-cluster
    grouplist:
      default: ms-daop-seata-service-develop: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-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
