ソースを参照

增加多配置文件

hanqingsong 1 年間 前
コミット
d20f0dae42
共有3 個のファイルを変更した101 個の追加55 個の削除を含む
  1. 51 0
      src/main/resources/bootstrap-dev.yml
  2. 46 0
      src/main/resources/bootstrap-prod.yml
  3. 4 55
      src/main/resources/bootstrap.yml

+ 51 - 0
src/main/resources/bootstrap-dev.yml

@@ -0,0 +1,51 @@
1
+# 注册中心配置
2
+eureka:
3
+  client:
4
+    service-url:
5
+      defaultZone: http://localhost:9001/eureka/
6
+    #register-with-eureka: false
7
+    #fetchRegistry: false
8
+  instance:
9
+    prefer-ip-address: true
10
+    lease-renewal-interval-in-seconds: 10
11
+    lease-expiration-duration-in-seconds: 30
12
+    status-page-url-path: /swagger-ui.html
13
+spring:
14
+  # 数据库配置
15
+  datasource:
16
+    driver-class-name: com.mysql.jdbc.Driver
17
+    url: jdbc:mysql://101.36.160.140:10311/depot_qh?useUnicode=true&characterEncoding=utf-8
18
+    username: root
19
+    password: admin@1234
20
+  session:
21
+    store-type: redis
22
+  redis:
23
+    database: 0
24
+    host: 101.36.160.140
25
+    port: 10316
26
+    password: admin@1234
27
+    timeout: 3000ms
28
+    jedis:
29
+      pool:
30
+        max-active: 8
31
+        max-wait: -1ms
32
+        max-idle: 8
33
+        min-idle: 0
34
+  # 静态资源配置
35
+  resources:
36
+    static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${web.upload-path}
37
+  servlet:
38
+    multipart:
39
+      max-file-size: 20MB
40
+      max-request-size: 20MB
41
+  # 缓存配置 host: redis-depot
42
+web:
43
+  upload-path: /home
44
+api:
45
+  safety:
46
+    host: localhost
47
+    port: 8765
48
+reportUrl: http://101.36.160.140:8097
49
+logging:
50
+  level:
51
+    com.chinaitop.depot.risk.mapper: debug

+ 46 - 0
src/main/resources/bootstrap-prod.yml

@@ -0,0 +1,46 @@
1
+# 注册中心配置
2
+eureka:
3
+  client:
4
+    service-url:
5
+      defaultZone: http://localhost:9001/eureka/
6
+  instance:
7
+    prefer-ip-address: true
8
+    lease-renewal-interval-in-seconds: 10
9
+    lease-expiration-duration-in-seconds: 30
10
+    status-page-url-path: /swagger-ui.html
11
+spring:
12
+  # 数据库配置
13
+  datasource:
14
+    driver-class-name: com.mysql.jdbc.Driver
15
+    url: jdbc:mysql://172.18.93.244:3306/depot_qh?useUnicode=true&characterEncoding=utf-8
16
+    username: root
17
+    password: qh_admin@3579
18
+  session:
19
+    store-type: redis
20
+  redis:
21
+    database: 0
22
+    host: 172.18.93.229
23
+    port: 6379
24
+    password: qh_redis@3579
25
+    timeout: 3000ms
26
+    jedis:
27
+      pool:
28
+        max-active: 8
29
+        max-wait: -1ms
30
+        max-idle: 8
31
+        min-idle: 0
32
+  # 静态资源配置
33
+  resources:
34
+    static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${web.upload-path}
35
+  servlet:
36
+    multipart:
37
+      max-file-size: 20MB
38
+      max-request-size: 20MB
39
+  # 缓存配置 host: redis-depot
40
+web:
41
+  upload-path: /home/qh/depot/depotImg
42
+api:
43
+  safety:
44
+    host: localhost
45
+    port: 8765
46
+reportUrl: http://101.36.160.140:8097

+ 4 - 55
src/main/resources/bootstrap.yml

@@ -2,61 +2,10 @@ server:
2 2
   port: 9012
3 3
   tomcat:
4 4
     uri-encoding: utf-8
5
-reportUrl: http://101.36.160.140:8097
6
-mybatis:
7
-  config-location: classpath:mybatis/mybatis-config.xml
8
-
9
-# 注册中心配置
10
-eureka:
11
-  client:
12
-    service-url:
13
-      defaultZone: http://localhost:9001/eureka/
14
-    #register-with-eureka: false
15
-    #fetchRegistry: false
16
-  instance:
17
-    prefer-ip-address: true
18
-    lease-renewal-interval-in-seconds: 10
19
-    lease-expiration-duration-in-seconds: 30
20
-    status-page-url-path: /swagger-ui.html
21
-
22 5
 spring:
23 6
   application:
24 7
     name: depot-storage
25
-  # 数据库配置
26
-  datasource:
27
-    driver-class-name: com.mysql.jdbc.Driver
28
-    url: jdbc:mysql://101.36.160.140:10311/depot_qh?useUnicode=true&characterEncoding=utf-8
29
-    username: root
30
-    password: admin@1234
31
-  session:
32
-    store-type: redis
33
-  redis:
34
-    database: 0
35
-    host: 101.36.160.140
36
-    port: 10316
37
-    password: admin@1234
38
-    timeout: 3000
39
-    jedis:
40
-      pool:
41
-        max-active: 8
42
-        max-wait: -1
43
-        max-idle: 8
44
-        min-idle: 0
45
-  # 静态资源配置
46
-  resources:
47
-    static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${web.upload-path}
48
-  servlet:
49
-    multipart:
50
-      max-file-size: 20MB
51
-      max-request-size: 20MB
52
-  # 缓存配置 host: redis-depot
53
-web:
54
-  upload-path: /home
55
-
56
-api:
57
-  safety:
58
-    host: localhost
59
-    port: 8765
60
-logging:
61
-  level:
62
-    com.chinaitop.depot.risk.mapper: debug
8
+  profiles:
9
+    active: dev
10
+mybatis:
11
+  config-location: classpath:mybatis/mybatis-config.xml