blue
3 months ago
committed by
Gitee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with
6 additions and
1 deletions
-
im-common/src/main/java/com/bx/imcommon/mq/RedisMQTemplate.java
|
|
|
@ -20,7 +20,12 @@ public class RedisMQTemplate extends RedisTemplate<String, Object> { |
|
|
|
if (version.isEmpty()) { |
|
|
|
RedisConnection connection = RedisConnectionUtils.getConnection(getConnectionFactory()); |
|
|
|
Properties properties = connection.info(); |
|
|
|
version = properties.getProperty("redis_version"); |
|
|
|
for (String key : properties.stringPropertyNames()) { |
|
|
|
if (key.contains("redis_version")) { |
|
|
|
version = properties.getProperty(key); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
RedisConnectionUtils.releaseConnection(connection,getConnectionFactory()); |
|
|
|
} |
|
|
|
return version; |
|
|
|
|