Forráskód Böngészése

修改配置文件

k 1 éve
szülő
commit
5ae623c49c

+ 38 - 70
src/main/resources/application-prod.yml

@@ -1,73 +1,41 @@
 spring:
-    datasource:
-        type: com.alibaba.druid.pool.DruidDataSource
-        driverClassName: net.sf.log4jdbc.DriverSpy
-        druid:
-            first:  #数据源1
-                url: jdbc:log4jdbc:mysql://localhost:3306/warewms_message?allowMultiQueries=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
-                username: root
-                password: root
-                initial-size: 10
-                max-active: 50
-                min-idle: 1
-                max-wait: 60000
-                pool-prepared-statements: true
-                max-pool-prepared-statement-per-connection-size: 20
-                time-between-eviction-runs-millis: 60000
-                min-evictable-idle-time-millis: 300000
-                validation-query: SELECT 1 FROM DUAL
-                test-while-idle: true
-                test-on-borrow: false
-                test-on-return: false
-                removeAbandonedTimeout: 1800
-                removeAbandoned: false
-                #removeAbandonedTimeoutMillis: 300000
-                stat-view-servlet:
-                    enabled: true
-                    url-pattern: /druid/*
-                    #login-username: admin
-                    #login-password: admin
-                filter:
-                    stat:
-                        log-slow-sql: true
-                        slow-sql-millis: 1000
-                        merge-sql: true
-                    wall:
-                        config:
-                            multi-statement-allow: true
-            second:  #数据源2
-                driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-                url: jdbc:sqlserver://172.27.16.3:1433;DatabaseName=SOADB
-                username: agv
-                password: agv
-                initial-size: 1
-                max-active: 10
-                min-idle: 10
-                max-wait: 60000
-                pool-prepared-statements: true
-                max-pool-prepared-statement-per-connection-size: 20
-                time-between-eviction-runs-millis: 60000
-                min-evictable-idle-time-millis: 300000
-                validation-query: SELECT getdate()
-                test-while-idle: true
-                test-on-borrow: false
-                test-on-return: false
-                removeAbandonedTimeout: 1800
-                removeAbandoned: false
-                #removeAbandonedTimeoutMillis: 300000
-                stat-view-servlet:
-                    enabled: true
-                    url-pattern: /druid/*
-                    #login-username: admin
-                    #login-password: admin
-                filter:
-                    stat:
-                        log-slow-sql: true
-                        slow-sql-millis: 1000
-                        merge-sql: true
-                    wall:
-                        config:
-                            multi-statement-allow: true
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driverClassName: net.sf.log4jdbc.DriverSpy
+    druid:
+      first: #数据源1
+        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        url: jdbc:sqlserver://192.168.2.121:1433;DatabaseName=AGV
+        username: sa
+        password: Quest@1688
+        initial-size: 10
+        max-active: 50
+        min-idle: 1
+        max-wait: 60000
+        pool-prepared-statements: true
+        max-pool-prepared-statement-per-connection-size: 20
+        time-between-eviction-runs-millis: 60000
+        min-evictable-idle-time-millis: 300000
+        validation-query: select getdate()
+        test-while-idle: true
+        test-on-borrow: false
+        test-on-return: false
+        removeAbandonedTimeout: 1800
+        removeAbandoned: false
+        #removeAbandonedTimeoutMillis: 300000
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          #login-username: admin
+          #login-password: admin
+        filter:
+          stat:
+            log-slow-sql: true
+            slow-sql-millis: 1000
+            merge-sql: true
+          wall:
+            config:
+              multi-statement-allow: true
 
 logging:
-    config: classpath:logback-spring.xml
+  config: classpath:logback-spring.xml

+ 1 - 1
src/main/resources/application.yml

@@ -19,7 +19,7 @@ info:
 spring:
   # 环境 dev|test|prod
   profiles:
-    active: dev
+    active: prod
   #        default: dev
   # jackson时间格式化
   jackson: