From 7e428f823128ec5fdbff3a8f73e9ea1f1a4a23ba Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 04 一月 2022 19:40:01 +0800
Subject: [PATCH] 修复redis配置功能在redis配置了 notify-keyspace-events时无法强制配置的问题

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java
index 3fc6a3c..16d8da7 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java
@@ -2,6 +2,7 @@
 
 import com.alibaba.fastjson.JSONObject;
 import com.genersoft.iot.vmp.common.VideoManagerConstants;
+import com.genersoft.iot.vmp.conf.RedisKeyExpirationEventMessageListener;
 import com.genersoft.iot.vmp.conf.UserSetup;
 import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
 import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils;
@@ -21,7 +22,7 @@
  * @date:   2020骞�5鏈�6鏃� 涓婂崍11:35:46     
  */
 @Component
-public class ZLMKeepliveTimeoutListener extends KeyExpirationEventMessageListener {
+public class ZLMKeepliveTimeoutListener extends RedisKeyExpirationEventMessageListener {
 
     private Logger logger = LoggerFactory.getLogger(ZLMKeepliveTimeoutListener.class);
 
@@ -37,20 +38,12 @@
 	@Autowired
 	private IMediaServerService mediaServerService;
 
-    @Override
-    public void init() {
-        if (!userSetup.getRedisConfig()) {
-            // 閰嶇疆springboot榛樿Config涓虹┖锛屽嵆涓嶈搴旂敤鍘讳慨鏀箁edis鐨勯粯璁ら厤缃紝鍥犱负Redis鏈嶅姟鍑轰簬瀹夊叏浼氱鐢–ONFIG鍛戒护缁欒繙绋嬬敤鎴蜂娇鐢�
-            setKeyspaceNotificationsConfigParameter("");
-        }
-        super.init();
+    public ZLMKeepliveTimeoutListener(RedisMessageListenerContainer listenerContainer, UserSetup userSetup) {
+        super(listenerContainer, userSetup);
     }
 
-	public ZLMKeepliveTimeoutListener(RedisMessageListenerContainer listenerContainer) {
-		super(listenerContainer);
-	}
 
-	/**
+    /**
      * 鐩戝惉澶辨晥鐨刱ey锛宬ey鏍煎紡涓簁eeplive_deviceId
      * @param message
      * @param pattern

--
Gitblit v1.8.0