From 1a9e49d9ff210e39f6297150db758906a4f02e6f Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 19 八月 2022 17:11:51 +0800
Subject: [PATCH] 依赖包版本升级

---
 src/main/java/com/genersoft/iot/vmp/conf/redis/RedisConfig.java |  177 +++++++++++++++++++++++++++++------------------------------
 1 files changed, 87 insertions(+), 90 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/conf/RedisConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/redis/RedisConfig.java
similarity index 90%
rename from src/main/java/com/genersoft/iot/vmp/conf/RedisConfig.java
rename to src/main/java/com/genersoft/iot/vmp/conf/redis/RedisConfig.java
index 449a018..7bdeab4 100644
--- a/src/main/java/com/genersoft/iot/vmp/conf/RedisConfig.java
+++ b/src/main/java/com/genersoft/iot/vmp/conf/redis/RedisConfig.java
@@ -1,90 +1,87 @@
-package com.genersoft.iot.vmp.conf;
-
-import com.alibaba.fastjson.parser.ParserConfig;
-import com.genersoft.iot.vmp.common.VideoManagerConstants;
-import com.genersoft.iot.vmp.service.impl.*;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cache.annotation.CachingConfigurerSupport;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.connection.RedisConnectionFactory;
-import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.data.redis.listener.PatternTopic;
-import org.springframework.data.redis.listener.RedisMessageListenerContainer;
-import org.springframework.data.redis.serializer.StringRedisSerializer;
-
-import com.genersoft.iot.vmp.utils.redis.FastJsonRedisSerializer;
-
-
-/**
- * @description:Redis涓棿浠堕厤缃被锛屼娇鐢╯pring-data-redis闆嗘垚锛岃嚜鍔ㄤ粠application.yml涓姞杞絩edis閰嶇疆
- * @author: swwheihei
- * @date: 2019骞�5鏈�30鏃� 涓婂崍10:58:25
- * 
- */
-@Configuration
-public class RedisConfig extends CachingConfigurerSupport {
-
-	@Autowired
-	private RedisGpsMsgListener redisGPSMsgListener;
-
-	@Autowired
-	private RedisAlarmMsgListener redisAlarmMsgListener;
-
-	@Autowired
-	private RedisStreamMsgListener redisStreamMsgListener;
-
-	@Autowired
-	private RedisGbPlayMsgListener redisGbPlayMsgListener;
-
-	@Autowired
-	private RedisPushStreamStatusMsgListener redisPushStreamStatusMsgListener;
-
-	@Autowired
-	private RedisPushStreamListMsgListener redisPushStreamListMsgListener;
-
-	@Bean
-	public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
-		RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>();
-		// 浣跨敤fastJson搴忓垪鍖�
-		FastJsonRedisSerializer fastJsonRedisSerializer = new FastJsonRedisSerializer(Object.class);
-		// value鍊肩殑搴忓垪鍖栭噰鐢╢astJsonRedisSerializer
-		redisTemplate.setValueSerializer(fastJsonRedisSerializer);
-		redisTemplate.setHashValueSerializer(fastJsonRedisSerializer);
-		// 鍏ㄥ眬寮�鍚疉utoType锛屼笉寤鸿浣跨敤
-		 ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
-		// 寤鸿浣跨敤杩欑鏂瑰紡锛屽皬鑼冨洿鎸囧畾鐧藉悕鍗曪紝闇�瑕佸簭鍒楀寲鐨勭被
-//		ParserConfig.getGlobalInstance().addAccept("com.avatar");
-		// key鐨勫簭鍒楀寲閲囩敤StringRedisSerializer
-		redisTemplate.setKeySerializer(new StringRedisSerializer());
-		redisTemplate.setHashKeySerializer(new StringRedisSerializer());
-		redisTemplate.setConnectionFactory(redisConnectionFactory);
-		return redisTemplate;
-	}
-
-
-	/**
-	 * redis娑堟伅鐩戝惉鍣ㄥ鍣� 鍙互娣诲姞澶氫釜鐩戝惉涓嶅悓璇濋鐨剅edis鐩戝惉鍣紝鍙渶瑕佹妸娑堟伅鐩戝惉鍣ㄥ拰鐩稿簲鐨勬秷鎭闃呭鐞嗗櫒缁戝畾锛岃娑堟伅鐩戝惉鍣�
-	 * 閫氳繃鍙嶅皠鎶�鏈皟鐢ㄦ秷鎭闃呭鐞嗗櫒鐨勭浉鍏虫柟娉曡繘琛屼竴浜涗笟鍔″鐞�
-	 * 
-	 * @param connectionFactory
-	 * @return
-	 */
-	@Bean
-	RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory) {
-
-        RedisMessageListenerContainer container = new RedisMessageListenerContainer();
-        container.setConnectionFactory(connectionFactory);
-		container.addMessageListener(redisGPSMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_GPS));
-		container.addMessageListener(redisAlarmMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_SUBSCRIBE_ALARM_RECEIVE));
-		container.addMessageListener(redisStreamMsgListener, new PatternTopic(VideoManagerConstants.WVP_MSG_STREAM_CHANGE_PREFIX + "PUSH"));
-		container.addMessageListener(redisGbPlayMsgListener, new PatternTopic(RedisGbPlayMsgListener.WVP_PUSH_STREAM_KEY));
-		container.addMessageListener(redisPushStreamStatusMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_PUSH_STREAM_STATUS_CHANGE));
-		container.addMessageListener(redisPushStreamListMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_PUSH_STREAM_LIST_CHANGE));
-        return container;
-    }
-
-}
+package com.genersoft.iot.vmp.conf.redis;
+
+
+import com.alibaba.fastjson.parser.ParserConfig;
+import com.genersoft.iot.vmp.common.VideoManagerConstants;
+import com.genersoft.iot.vmp.service.impl.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CachingConfigurerSupport;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.listener.PatternTopic;
+import org.springframework.data.redis.listener.RedisMessageListenerContainer;
+import org.springframework.data.redis.serializer.RedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+import com.genersoft.iot.vmp.utils.redis.FastJsonRedisSerializer;
+
+
+/**
+ * @description:Redis涓棿浠堕厤缃被锛屼娇鐢╯pring-data-redis闆嗘垚锛岃嚜鍔ㄤ粠application.yml涓姞杞絩edis閰嶇疆
+ * @author: swwheihei
+ * @date: 2019骞�5鏈�30鏃� 涓婂崍10:58:25
+ * 
+ */
+@Configuration
+public class RedisConfig extends CachingConfigurerSupport {
+
+	@Autowired
+	private RedisGpsMsgListener redisGPSMsgListener;
+
+	@Autowired
+	private RedisAlarmMsgListener redisAlarmMsgListener;
+
+	@Autowired
+	private RedisStreamMsgListener redisStreamMsgListener;
+
+	@Autowired
+	private RedisGbPlayMsgListener redisGbPlayMsgListener;
+
+	@Autowired
+	private RedisPushStreamStatusMsgListener redisPushStreamStatusMsgListener;
+
+	@Autowired
+	private RedisPushStreamListMsgListener redisPushStreamListMsgListener;
+
+	@Bean
+	public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
+		RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>();
+		// 浣跨敤fastJson搴忓垪鍖�
+		FastJsonRedisSerializer fastJsonRedisSerializer = new FastJsonRedisSerializer(Object.class);
+		// value鍊肩殑搴忓垪鍖栭噰鐢╢astJsonRedisSerializer
+		redisTemplate.setValueSerializer(fastJsonRedisSerializer);
+		redisTemplate.setHashValueSerializer(fastJsonRedisSerializer);
+		// 鍏ㄥ眬寮�鍚疉utoType锛屼笉寤鸿浣跨敤
+		 ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
+		// key鐨勫簭鍒楀寲閲囩敤StringRedisSerializer
+		redisTemplate.setKeySerializer(new StringRedisSerializer());
+		redisTemplate.setHashKeySerializer(new StringRedisSerializer());
+		redisTemplate.setConnectionFactory(redisConnectionFactory);
+		return redisTemplate;
+	}
+
+
+	/**
+	 * redis娑堟伅鐩戝惉鍣ㄥ鍣� 鍙互娣诲姞澶氫釜鐩戝惉涓嶅悓璇濋鐨剅edis鐩戝惉鍣紝鍙渶瑕佹妸娑堟伅鐩戝惉鍣ㄥ拰鐩稿簲鐨勬秷鎭闃呭鐞嗗櫒缁戝畾锛岃娑堟伅鐩戝惉鍣�
+	 * 閫氳繃鍙嶅皠鎶�鏈皟鐢ㄦ秷鎭闃呭鐞嗗櫒鐨勭浉鍏虫柟娉曡繘琛屼竴浜涗笟鍔″鐞�
+	 * 
+	 * @param connectionFactory
+	 * @return
+	 */
+	@Bean
+	RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory) {
+
+        RedisMessageListenerContainer container = new RedisMessageListenerContainer();
+        container.setConnectionFactory(connectionFactory);
+		container.addMessageListener(redisGPSMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_GPS));
+		container.addMessageListener(redisAlarmMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_SUBSCRIBE_ALARM_RECEIVE));
+		container.addMessageListener(redisStreamMsgListener, new PatternTopic(VideoManagerConstants.WVP_MSG_STREAM_CHANGE_PREFIX + "PUSH"));
+		container.addMessageListener(redisGbPlayMsgListener, new PatternTopic(RedisGbPlayMsgListener.WVP_PUSH_STREAM_KEY));
+		container.addMessageListener(redisPushStreamStatusMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_PUSH_STREAM_STATUS_CHANGE));
+		container.addMessageListener(redisPushStreamListMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_PUSH_STREAM_LIST_CHANGE));
+        return container;
+    }
+
+}

--
Gitblit v1.8.0