|
|
@@ -2,28 +2,63 @@ server:
|
|
2
|
2
|
port: 9023
|
|
3
|
3
|
tomcat:
|
|
4
|
4
|
uri-encoding: utf-8
|
|
5
|
|
-
|
|
6
|
5
|
# 注册中心配置
|
|
7
|
6
|
eureka:
|
|
8
|
7
|
client:
|
|
9
|
8
|
service-url:
|
|
10
|
|
- defaultZone: http://172.16.0.8:9001/eureka/,http://172.16.0.9:9001/eureka/
|
|
|
9
|
+ defaultZone: http://172.16.0.8:9001/eureka/
|
|
11
|
10
|
instance:
|
|
12
|
11
|
prefer-ip-address: true
|
|
13
|
12
|
# 每隔10s发送一次心跳(默认30s)
|
|
14
|
13
|
lease-renewal-interval-in-seconds: 10
|
|
15
|
14
|
# 告知服务端30秒还未收到心跳的话,就将该服务移除列表(默认90s)
|
|
16
|
15
|
lease-expiration-duration-in-seconds: 30
|
|
17
|
|
-
|
|
18
|
16
|
spring:
|
|
19
|
17
|
application:
|
|
20
|
18
|
name: depot-system
|
|
21
|
|
- # 数据库配置
|
|
22
|
|
- datasource:
|
|
23
|
|
- driverClassName: com.mysql.cj.jdbc.Driver
|
|
24
|
|
- url: jdbc:mysql://101.36.160.140:10311/depot_yunnan?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
|
|
25
|
|
- username: root
|
|
26
|
|
- password: 123456
|
|
|
19
|
+ shardingsphere:
|
|
|
20
|
+ props:
|
|
|
21
|
+ sql-show: true
|
|
|
22
|
+ mode:
|
|
|
23
|
+ type: Standalone
|
|
|
24
|
+ overwrite: true
|
|
|
25
|
+ repository:
|
|
|
26
|
+ type: File
|
|
|
27
|
+ props:
|
|
|
28
|
+ path: D:/Standalone/depot-system
|
|
|
29
|
+# path: /home/depot/Standalone/depot-system
|
|
|
30
|
+ datasource:
|
|
|
31
|
+ names: depot-master-01,depot-slave-01,depot-slave-02
|
|
|
32
|
+ depot-master-01:
|
|
|
33
|
+ type: com.zaxxer.hikari.HikariDataSource
|
|
|
34
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
35
|
+ jdbc-url: jdbc:mysql://172.16.0.8:3306/depot?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
|
|
|
36
|
+ username: root
|
|
|
37
|
+ password: 123456
|
|
|
38
|
+ depot-slave-01:
|
|
|
39
|
+ type: com.zaxxer.hikari.HikariDataSource
|
|
|
40
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
41
|
+ jdbc-url: jdbc:mysql://172.16.0.9:3306/depot?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
|
|
|
42
|
+ username: root
|
|
|
43
|
+ password: 123456
|
|
|
44
|
+ depot-slave-02:
|
|
|
45
|
+ type: com.zaxxer.hikari.HikariDataSource
|
|
|
46
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
47
|
+ jdbc-url: jdbc:mysql://172.16.0.10:3306/depot?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
|
|
|
48
|
+ username: root
|
|
|
49
|
+ password: 123456
|
|
|
50
|
+ rules:
|
|
|
51
|
+ readwrite-splitting:
|
|
|
52
|
+ data-sources:
|
|
|
53
|
+ depot:
|
|
|
54
|
+ type: Static
|
|
|
55
|
+ props:
|
|
|
56
|
+ write-data-source-name: depot-master-01
|
|
|
57
|
+ read-data-source-names: depot-slave-01,depot-slave-02
|
|
|
58
|
+ load-balancer-name: depot_algorithm
|
|
|
59
|
+ load-balancers:
|
|
|
60
|
+ depot_algorithm:
|
|
|
61
|
+ type: ROUND_ROBIN
|
|
27
|
62
|
# 缓存配置
|
|
28
|
63
|
session:
|
|
29
|
64
|
store-type: redis
|
|
|
@@ -47,7 +82,7 @@ web:
|
|
47
|
82
|
upload-path: /upload
|
|
48
|
83
|
|
|
49
|
84
|
#设置全局变量判断是云端还是库端;1云端,2本地
|
|
50
|
|
-localOrCloud: 2
|
|
|
85
|
+localOrCloud: 1
|
|
51
|
86
|
|
|
52
|
87
|
#设置出入库连接
|
|
53
|
88
|
forTheConnection: http://101.36.160.210:9901/Base/Main.action
|