keys pattern 查询相应的key 在redis里,允许模糊查询key 有3个通配符 *, ? ,[] *: 通配任意多个字符 ?: 通配单个字符 []: 通配括号内的某1个字符 redis 127.0.0.1:6379> flushdb OK redis 127.0.0.1:6379> keys * (empty list or set) redis 127.0.0.1:6379> mset one 1 two 2 three 3 four 4 OK redis 127.0.0
talk is cheap, show me the code. 一.开启Redis key过期提醒 方式二:修改配置文件 redis.conf # 默认 notify-keyspace-events "" notify-keyspace-events Ex 方式二:命令行开启 CONFIG SET notify-keyspace-events Ex CONFIG GET notify-keyspace-events 二.notify-keyspace-events notify-ke
一.测试数据准备 List<Map<String, String>> result = new ArrayList();Map<String, String> map = new HashMap<>();map.put("san", "张三");map.put("si", "李四");map.put("wu", "王五");map.put(