redis key模糊查找
*:通配任意多个字符
?:通配单个字符
[]:通配括号内的某一个字符
returnstringRedisTemplate.keys("*"+ pattern + "*");
return stringRedisTemplate.keys("?" + pattern);
return stringRedisTemplate.keys("[" + pattern + "]");
127.0.0.1:6379> keys *ge
1) "vge"
2) "sge"
3) "zge"
4) "age"
127.0.0.1:6379> keys *e
1) "vge"
2) "sge"
3) "name"
4) "zge"
5) "age"
6) "namee"
7) "allSeedName"
127.0.0.1:6379> keys ?e
(empty list or set)
127.0.0.1:6379> keys ?ge
1) "vge"
2) "sge"
3) "zge"
4) "age"
127.0.0.1:6379> keys ???
1) "vge"
2) "sge"
3) "www"
4) "zge"
5) "age"