码迷,mamicode.com
首页 > 其他好文 > 详细

Jedis

时间:2017-06-12 00:53:46      阅读:300      评论:0      收藏:0      [点我收藏+]

标签:system   ati   hashmap   []   span   string   main   pre   color   

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);
    
    
  }
}

 

Jedis

标签:system   ati   hashmap   []   span   string   main   pre   color   

原文地址:http://www.cnblogs.com/mazing/p/6986867.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!