Procházet zdrojové kódy

修改配置文件

ZeroLiYi před 1 rokem
rodič
revize
50b9244a7b
3 změnil soubory, kde provedl 64 přidání a 28 odebrání
  1. 12 0
      pom.xml
  2. 13 13
      src/main/resources/bootstrap-dev.yml
  3. 39 15
      src/main/resources/bootstrap-test.yml

+ 12 - 0
pom.xml

@@ -48,6 +48,18 @@
48 48
             <artifactId>guava</artifactId>
49 49
             <version>20.0</version>
50 50
         </dependency>
51
+        <dependency>
52
+            <groupId>com.alibaba</groupId>
53
+            <artifactId>druid</artifactId>
54
+            <version>1.1.10</version>
55
+            <scope>compile</scope>
56
+        </dependency>
57
+        <!--mysql数据库-->
58
+        <dependency>
59
+            <groupId>mysql</groupId>
60
+            <artifactId>mysql-connector-java</artifactId>
61
+            <version>8.0.28</version>
62
+        </dependency>
51 63
     </dependencies>
52 64
     <build>
53 65
         <plugins>

+ 13 - 13
src/main/resources/bootstrap-dev.yml

@@ -7,19 +7,19 @@ spring:
7 7
     name: safety-app-dev
8 8
 
9 9
   #配置中心配置
10
-  cloud:
11
-    config:
12
-      #使用discovery 时需要将eureka 写到该文件中,开发环境使用该方式,推荐使用。
13
-      discovery:
14
-        enabled: true
15
-        service-id: config
16
-      name: feign,mq-producer-log
17
-      profile: dev
18
-      username: configuser
19
-      password: configpasd
20
-      retry:
21
-        max-attempts: 5
22
-        max-interval: 2000
10
+#  cloud:
11
+#    config:
12
+#      #使用discovery 时需要将eureka 写到该文件中,开发环境使用该方式,推荐使用。
13
+#      discovery:
14
+#        enabled: true
15
+#        service-id: config
16
+#      name: feign,mq-producer-log
17
+#      profile: dev
18
+#      username: configuser
19
+#      password: configpasd
20
+#      retry:
21
+#        max-attempts: 5
22
+#        max-interval: 2000
23 23
       #如果出现错误立刻停止服务。
24 24
       #fail-fast: true
25 25
 #服务注册配置

+ 39 - 15
src/main/resources/bootstrap-test.yml

@@ -2,31 +2,55 @@ server:
2 2
   port: 13660
3 3
   tomcat:
4 4
     basedir: .
5
+
5 6
 spring:
7
+#  jpa:
8
+#    open-in-view: true
9
+#    database: mysql
10
+#    show-sql: false
11
+#    properties:
12
+#      hibernate:
13
+#        dialect: org.hibernate.dialect.MySQLDialect
6 14
   application:
7 15
     name: safety-app-g
16
+  devtools:
17
+    restart:
18
+      enabled: false
19
+  datasource:
20
+    #    type: com.alibaba.druid.pool.DruidDataSource
21
+    #    url: jdbc:gbasedbt-sqli://101.36.160.140:19089/ywbb:INFORMIXSERVER=gbaseserver;DB_LOCALE=zh_cn.GB18030-2000;CLIENT_LOCALE=zh_cn.utf8;NEWCODESET=GB18030,GB18030-2000,5488;;GL_USEGLU=1;IFX_USE_STRENC=true;characterEncoding=utf8;
22
+    #    //url: jdbc:gbasedbt-sqli://111.164.113.172:666/ywbb:INFORMIXSERVER=gbaseserver;DB_LOCALE=zh_cn.GB18030-2000;CLIENT_LOCALE=zh_cn.utf8;NEWCODESET=GB18030,GB18030-2000,5488;;GL_USEGLU=1;IFX_USE_STRENC=true;characterEncoding=utf8;
23
+    #    username: gbasedbt
24
+    #    password: cDbK2S0go8
25
+    #    driver-class-name: com.gbasedbt.jdbc.IfxDriver
26
+    type: com.alibaba.druid.pool.DruidDataSource
27
+    driver-class-name: com.mysql.cj.jdbc.Driver
28
+    url: jdbc:mysql://101.36.160.140:10311/ywbb?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=GMT%2b8
29
+    username: root
30
+    password: admin@1234
31
+    druid:
8 32
 
9
-  #配置中心配置
10
-  cloud:
11
-    config:
12
-      #使用discovery 时需要将eureka 写到该文件中,开发环境使用该方式,推荐使用。
13
-      discovery:
14
-        enabled: true
15
-        service-id: config
16
-      name: feign,mq-producer-log
17
-      profile: dev
18
-      username: configuser
19
-      password: configpasd
20
-      retry:
21
-        max-attempts: 5
22
-        max-interval: 2000
33
+#  #配置中心配置
34
+#  cloud:
35
+#    config:
36
+#      #使用discovery 时需要将eureka 写到该文件中,开发环境使用该方式,推荐使用。
37
+#      discovery:
38
+#        enabled: true
39
+#        service-id: config
40
+#      name: feign,mq-producer-log
41
+#      profile: dev
42
+#      username: configuser
43
+#      password: configpasd
44
+#      retry:
45
+#        max-attempts: 5
46
+#        max-interval: 2000
23 47
       #如果出现错误立刻停止服务。
24 48
       #fail-fast: true
25 49
 #服务注册配置
26 50
 eureka:
27 51
   client:
28 52
     service-url:
29
-      defaultZone: http://172.16.0.46:11000/eureka/
53
+      defaultZone: http://172.16.0.4:11000/eureka/
30 54
   instance:
31 55
     prefer-ip-address: true
32 56
     status-page-url-path: /swagger-ui.html