Ver código fonte

修改多配置文件

hanqingsong 1 ano atrás
pai
commit
92ae4f4c42

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

@@ -0,0 +1,44 @@
1
+# 注册中心配置
2
+eureka:
3
+  client:
4
+    service-url:
5
+      defaultZone: http://localhost:9001/eureka/
6
+  instance:
7
+    hostname: 172.16.0.46
8
+    #prefer-ip-address: true
9
+    # 每隔10s发送一次心跳(默认30s)
10
+    lease-renewal-interval-in-seconds: 10
11
+    # 告知服务端30秒还未收到心跳的话,就将该服务移除列表(默认90s)
12
+    lease-expiration-duration-in-seconds: 30
13
+    status-page-url: http://${eureka.instance.hostname}:9026/swagger-ui.html
14
+spring:
15
+  # 数据库配置
16
+  datasource:
17
+    driver-class-name: com.mysql.jdbc.Driver
18
+    url: jdbc:mysql://172.16.0.36:3306/crk_qh?useUnicode=true&characterEncoding=utf-8&useSSL=false
19
+    username: root
20
+    password: admin@1234
21
+  # 缓存配置
22
+  session:
23
+    store-type: redis
24
+  redis:
25
+    database: 0
26
+    host: 172.16.0.36
27
+    port: 6379
28
+    password: admin@1234
29
+    timeout: 3000ms
30
+    jedis:
31
+      pool:
32
+        max-active: 8
33
+        max-wait: -1ms
34
+        max-idle: 8
35
+        min-idle: 0
36
+  servlet:
37
+    multipart:
38
+      max-file-size: 10Mb
39
+      max-request-size: 10Mb
40
+  # 静态资源配置
41
+  resources:
42
+    static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${web.upload-path}
43
+web:
44
+  upload-path: /home/depot/depot-web/apache-tomcat-8.0.53/webapps/ROOT/WEB-INF/classes/static

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

@@ -0,0 +1,44 @@
1
+# 注册中心配置
2
+eureka:
3
+  client:
4
+    service-url:
5
+      defaultZone: http://localhost:9001/eureka/
6
+  instance:
7
+    hostname: localhost
8
+    #prefer-ip-address: true
9
+    # 每隔10s发送一次心跳(默认30s)
10
+    lease-renewal-interval-in-seconds: 10
11
+    # 告知服务端30秒还未收到心跳的话,就将该服务移除列表(默认90s)
12
+    lease-expiration-duration-in-seconds: 30
13
+    status-page-url: http://${eureka.instance.hostname}:9026/swagger-ui.html
14
+spring:
15
+  # 数据库配置
16
+  datasource:
17
+    driver-class-name: com.mysql.jdbc.Driver
18
+    url: jdbc:mysql://172.18.93.244:3306/crk_qh?useUnicode=true&characterEncoding=utf-8&useSSL=false
19
+    username: root
20
+    password: qh_admin@3579
21
+  # 缓存配置
22
+  session:
23
+    store-type: redis
24
+  redis:
25
+    database: 0
26
+    host: 172.18.93.229
27
+    port: 6379
28
+    password: qh_redis@3579
29
+    timeout: 3000ms
30
+    jedis:
31
+      pool:
32
+        max-active: 8
33
+        max-wait: -1ms
34
+        max-idle: 8
35
+        min-idle: 0
36
+  servlet:
37
+    multipart:
38
+      max-file-size: 10Mb
39
+      max-request-size: 10Mb
40
+  # 静态资源配置
41
+  resources:
42
+    static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${web.upload-path}
43
+web:
44
+  upload-path: /home/depot/depot-web/apache-tomcat-8.0.53/webapps/ROOT/WEB-INF/classes/static

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

@@ -2,60 +2,13 @@ server:
2 2
   port: 9026
3 3
   tomcat:
4 4
     uri-encoding: utf-8
5
-
6
-# 注册中心配置
7
-eureka:
8
-  client:
9
-    service-url:
10
-      defaultZone: http://localhost:9001/eureka/
11
-  instance:
12
-    hostname: localhost
13
-    #prefer-ip-address: true
14
-    # 每隔10s发送一次心跳(默认30s)
15
-    lease-renewal-interval-in-seconds: 10
16
-    # 告知服务端30秒还未收到心跳的话,就将该服务移除列表(默认90s)
17
-    lease-expiration-duration-in-seconds: 30
18
-    status-page-url: http://${eureka.instance.hostname}:9026/swagger-ui.html
19
-
20
-mybatis:
21
-  config-location: classpath:mybatis/mybatis-config.xml
22
-
23 5
 spring:
24
-  #profiles: local
25 6
   application:
26 7
     name: depot-agile
27
-  # 数据库配置
28
-  datasource:
29
-    driver-class-name: com.mysql.jdbc.Driver
30
-    url: jdbc:mysql://101.36.160.140:10311/crk_qh?useUnicode=true&characterEncoding=utf-8
31
-    username: root
32
-    password: admin@1234
33
-
34
-  # 缓存配置
35
-  session:
36
-    store-type: redis
37
-  redis:
38
-    database: 0
39
-    host: 101.36.160.140
40
-    port: 10316
41
-    password: admin@1234
42
-    timeout: 3000
43
-    jedis:
44
-      pool:
45
-        max-active: 8
46
-        max-wait: -1
47
-        max-idle: 8
48
-        min-idle: 0
8
+  profiles:
9
+    active: dev
49 10
   jackson:
50 11
     date-format: yyyy-MM-dd
51 12
     time-zone: GMT+8
52
-  servlet:
53
-    multipart:
54
-      max-file-size: 10Mb
55
-      max-request-size: 10Mb
56
-  # 静态资源配置
57
-  resources:
58
-    static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${web.upload-path}
59
-
60
-web:
61
-  upload-path: /home/depot/depot-web/apache-tomcat-8.0.53/webapps/ROOT/WEB-INF/classes/static
13
+mybatis:
14
+  config-location: classpath:mybatis/mybatis-config.xml