Преглед изворни кода

优化数据库配置,避免长时间未操作断开连接

NorthLan пре 7 година
родитељ
комит
d00fc3d9ef
1 измењених фајлова са 6 додато и 6 уклоњено
  1. 6 6
      zen-web/src/main/resources/application-orm.yml

+ 6 - 6
zen-web/src/main/resources/application-orm.yml

@@ -25,11 +25,11 @@ spring:
 datasource:
   sys:
     name: system
-    url: jdbc:mysql://192.168.1.124:3307/archives_sys?pinGlobalTxToPhysicalConnection=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
+    url: jdbc:mysql://192.168.1.92:3307/archives_sys?pinGlobalTxToPhysicalConnection=true&autoReconnect=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
     driver-class-name: com.mysql.jdbc.Driver
     username: archives
     password: archives
-    test-on-borrow: false
+    test-on-borrow: true
     test-on-return: false
     test-while-idle: true
     validation-query: SELECT 1
@@ -43,11 +43,11 @@ datasource:
     min-evictable-idle-time-millis: 30000
   bus:
     name: business
-    url: jdbc:mysql://192.168.1.124:3307/archives_mgr?pinGlobalTxToPhysicalConnection=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
+    url: jdbc:mysql://192.168.1.92:3307/archives_mgr?pinGlobalTxToPhysicalConnection=true&autoReconnect=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
     driver-class-name: com.mysql.jdbc.Driver
     username: archives
     password: archives
-    test-on-borrow: false
+    test-on-borrow: true
     test-on-return: false
     test-while-idle: true
     validation-query: SELECT 1
@@ -61,11 +61,11 @@ datasource:
     min-evictable-idle-time-millis: 30000
   shared:
     name: shared
-    url: jdbc:mysql://192.168.1.124:3307/archives_shared?pinGlobalTxToPhysicalConnection=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
+    url: jdbc:mysql://192.168.1.92:3307/archives_shared?pinGlobalTxToPhysicalConnection=true&autoReconnect=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
     driver-class-name: com.mysql.jdbc.Driver
     username: archives
     password: archives
-    test-on-borrow: false
+    test-on-borrow: true
     test-on-return: false
     test-while-idle: true
     validation-query: SELECT 1