Jedis - hello world

Maven Dependency:

<dependency>
    <groupId>redis.clients</groupId>
    <artifactId>jedis</artifactId>
    <version>2.7.2</version>
    <type>jar</type>
    <scope>compile</scope>
</dependency>

Use:

Jedis jedis = new Jedis("127.0.0.1", 6379);
jedis.set("foo", "bar");
String value = jedis.get("foo");

 

posted on 2015-09-29 14:48  huey2672  阅读(214)  评论(0编辑  收藏  举报