From 1fd64b07ddb99c2d9cc8a358b71aceb6a2c81492 Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期三, 05 七月 2023 15:58:31 +0800
Subject: [PATCH] 修改nettyTCP客户端断开重连 增加数据库连接池 修改日志打印

---
 src/main/resources/application.yml |   35 +++++++++++++++++++++++++----------
 1 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 50a9b71..2f6c991 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,11 +1,34 @@
 spring:
+  datasource:
+      #  浣跨敤druid鏁版嵁搴撹繛鎺ユ睜
+    druid:
+        #寮�鍚痙ruid鐩戞帶web
+      stat-view-servlet:
+        enabled: true
+      driver-class-name: org.postgresql.Driver
+          #    url: jdbc:postgresql://111.40.46.199:15432/ry-vue?stringtype=unspecified
+          #    username: postgres
+          #    password: Yykj.2021
+      url: jdbc:postgresql://192.168.1.15:5432/ry-vue?stringtype=unspecified
+      username: postgres
+      password: postgres
+      #鏈�澶ц繛鎺ユ暟
+      maxActive: 30
+      #鏈�灏忚繛鎺ユ暟
+      minIdle: 5
+      #鑾峰彇杩炴帴鐨勬渶澶х瓑寰呮椂闂�
+      maxWait: 10000
+      #瑙e喅mysql8灏忔椂鐨勯棶棰�
+      validation-query: SELECT 'X'
+      #绌洪棽杩炴帴鐨勬鏌ユ椂闂撮棿闅�
+      timeBetweenEvictionRunsMillis: 60000
+      #绌洪棽杩炴帴鏈�灏忕┖闂叉椂闂�
+      minEvictableIdleTimeMillis: 300000
   netty:
     udp:
       port: 40000
       enabled: true
     tcp:
-      host: 112.98.126.2
-      port: 1200
       enabled: true
   mqtt:
     host: tcp://192.168.1.15:1883
@@ -18,14 +41,6 @@
     enabled: true
   stealelec:
     url: http://iot.zhdk.net:8090/Warning/GetWarning?userName=cy4oil
-  datasource:
-    driver-class-name: org.postgresql.Driver
-#    url: jdbc:postgresql://111.40.46.199:15432/ry-vue?stringtype=unspecified
-#    username: postgres
-#    password: Yykj.2021
-    url: jdbc:postgresql://192.168.1.15:5432/ry-vue?stringtype=unspecified
-    username: postgres
-    password: postgres
 mybatis:
   typeAliasesPackage: com.ard.alarm.**.domain
   mapperLocations: classpath:/mapper/*.xml

--
Gitblit v1.9.3