public static void main(String[] args) {
Jedis jedis = new Jedis("127.0.0.1");
//博客发布修改与查看
jedis.mset("article:1:title","学习redis",
"article:1:content","如何学好redis的使用",
"article:1:author","中华狮山",
"article:1:time","2020-01-01 00:00:00"
);
System.out.println(jedis.mget("article:1:title","article:1:content"));
jedis.mset("article:1:title","学习redis1",
"article:1:content","如何学好redis的使用1"
);
System.out.println(jedis.mget("article:1:title","article:1:content"));
Long bloglen= jedis.strlen("article:1:title");
System.out.println(bloglen);//12
String getrange = jedis.getrange("article:1:title", 0, 7);
System.out.println(getrange+"..");//学习re..
}