|
|
@@ -2,16 +2,43 @@ server:
|
|
2
|
2
|
port: 8000
|
|
3
|
3
|
swagger: false
|
|
4
|
4
|
spring:
|
|
5
|
|
- datasource:
|
|
6
|
|
- type: com.alibaba.druid.pool.DruidDataSource
|
|
7
|
|
- druid:
|
|
8
|
|
- url: jdbc:mysql://192.168.1.200:3306/jiayi?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
|
|
9
|
|
- username: root
|
|
10
|
|
- password: 800100
|
|
11
|
|
- driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
5
|
+ shardingsphere:
|
|
|
6
|
+ datasource:
|
|
|
7
|
+ names: master,slave0,slave1
|
|
|
8
|
+ master:
|
|
|
9
|
+ type: com.alibaba.druid.pool.DruidDataSource
|
|
|
10
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
11
|
+ url: jdbc:mysql://10.160.153.119:3306/jiayi?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
|
|
12
|
+ username: root
|
|
|
13
|
+ password: 123456
|
|
|
14
|
+ slave0:
|
|
|
15
|
+ type: com.alibaba.druid.pool.DruidDataSource
|
|
|
16
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
17
|
+ url: jdbc:mysql://10.160.153.119:3306/jiayi?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
|
|
18
|
+ username: root
|
|
|
19
|
+ password: 123456
|
|
|
20
|
+ slave1:
|
|
|
21
|
+ type: com.alibaba.druid.pool.DruidDataSource
|
|
|
22
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
23
|
+ url: jdbc:mysql://10.160.153.119:3306/jiayi?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
|
|
24
|
+ username: root
|
|
|
25
|
+ password: 123456
|
|
|
26
|
+ rules:
|
|
|
27
|
+ readwrite-splitting:
|
|
|
28
|
+ data-sources:
|
|
|
29
|
+ mds:
|
|
|
30
|
+ type: static
|
|
|
31
|
+ props:
|
|
|
32
|
+ write-data-source-name: master
|
|
|
33
|
+ read-data-source-names: slave0,slave1
|
|
|
34
|
+ load-balancer-name: read-random
|
|
|
35
|
+ load-balancers:
|
|
|
36
|
+ read-random:
|
|
|
37
|
+ type: round_robin
|
|
|
38
|
+ enabled: true
|
|
12
|
39
|
redis:
|
|
13
|
40
|
# 地址
|
|
14
|
|
- host: 192.168.1.200
|
|
|
41
|
+ host: 10.160.153.119
|
|
15
|
42
|
# 端口,默认为6379
|
|
16
|
43
|
port: 6379
|
|
17
|
44
|
# 数据库索引
|
|
|
@@ -20,3 +47,37 @@ spring:
|
|
20
|
47
|
password:
|
|
21
|
48
|
# 连接超时时间
|
|
22
|
49
|
timeout: 10s
|
|
|
50
|
+ data:
|
|
|
51
|
+ mongodb:
|
|
|
52
|
+ authentication-database: admin
|
|
|
53
|
+ host: 10.160.153.119
|
|
|
54
|
+ port: 27017
|
|
|
55
|
+ database: wechat
|
|
|
56
|
+ username: root
|
|
|
57
|
+ password: '123456'
|
|
|
58
|
+
|
|
|
59
|
+ rabbitmq:
|
|
|
60
|
+ host: 10.160.153.119
|
|
|
61
|
+ port: 5672
|
|
|
62
|
+ username: admin
|
|
|
63
|
+ password: 123456
|
|
|
64
|
+ virtual-host: /
|
|
|
65
|
+ #确认消息已发送到交换机(Exchange)
|
|
|
66
|
+ publisher-confirm-type: correlated
|
|
|
67
|
+ #确认消息已发送到队列(Queue)
|
|
|
68
|
+ publisher-returns: true
|
|
|
69
|
+ listener:
|
|
|
70
|
+ # direct:
|
|
|
71
|
+ # auto-startup: false
|
|
|
72
|
+ simple:
|
|
|
73
|
+ retry:
|
|
|
74
|
+ enabled: true # 开启消费者出现异常情况下,进行重试消费,默认false
|
|
|
75
|
+ max-attempts: 3 # 最大重试次数,默认为3
|
|
|
76
|
+ initial-interval: 3000 # 重试间隔时间,默认1000(单位毫秒)
|
|
|
77
|
+ # auto-startup: false
|
|
|
78
|
+
|
|
|
79
|
+ wechat:
|
|
|
80
|
+ AppId: wx4ff77198ae11494b
|
|
|
81
|
+ AppSecret: 2142698972a706a651f371e412d48a78
|
|
|
82
|
+ Token: wxtoken
|
|
|
83
|
+ EncodingAESKey:
|