public class jredis { public static void main(String[] args) { Map<String, String> map = new HashMap<>(); List<String> list; Jedis jedis = new Jedis("192.168.31.103", 6379); jedis.auth("111111"); String aa = "asdfa"; map.put("openid", "alsdkjfpo"); map.put("token", "asdfsdf"); jedis.hmset("user1", map); jedis.expire("user1", 10); list = jedis.hmget(aa, "token", "openid"); System.out.println(list); } }
时间: 2024-10-05 08:00:39