Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
f9ed3a89
Unverified
Commit
f9ed3a89
authored
May 20, 2022
by
Aborn Jiang
Committed by
GitHub
May 20, 2022
Browse files
fix weird prefixes keys when use RedisUtils.scan (#737)
parent
e37d485b
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-common/src/main/java/me/zhengjie/utils/RedisUtils.java
View file @
f9ed3a89
...
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Value;
...
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
import
org.springframework.data.redis.core.*
;
import
org.springframework.data.redis.core.*
;
import
org.springframework.data.redis.serializer.StringRedisSerializer
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.*
;
import
java.util.*
;
...
@@ -41,6 +42,9 @@ public class RedisUtils {
...
@@ -41,6 +42,9 @@ public class RedisUtils {
public
RedisUtils
(
RedisTemplate
<
Object
,
Object
>
redisTemplate
)
{
public
RedisUtils
(
RedisTemplate
<
Object
,
Object
>
redisTemplate
)
{
this
.
redisTemplate
=
redisTemplate
;
this
.
redisTemplate
=
redisTemplate
;
this
.
redisTemplate
.
setHashKeySerializer
(
new
StringRedisSerializer
());
this
.
redisTemplate
.
setKeySerializer
(
new
StringRedisSerializer
());
this
.
redisTemplate
.
setStringSerializer
(
new
StringRedisSerializer
());
}
}
/**
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment