Redis — java client jedis

Time:2020-10-18

Redis — java client jedis

Blog description

The information involved in this article comes from the Internet and personal summary, which means personal learning and experience summary. If there is any infringement, please contact me to delete it. Thank you!

brief introduction

Jedis: a Java operating redis database tool

Rookie tutorial document address

How to use it

Import jedis package

Redis -- java client jedis

use
package com.jedis.test;

import org.junit.Test;
import redis.clients.jedis.Jedis;

/**
 * @author guizimo
 *@ date 2020 / 7 / 15 4:42 PM
 */
public class JedisTest {
    @Test
    public void test(){
                //1. Get the connection
        Jedis jedis = new Jedis("127.0.0.1",6379);
        //2. Operation
        jedis.set("name","zhangsan");
        //3. Close the connection
        jedis.close();
    }
}

test

Redis -- java client jedis

thank

Rookie course

Omnipotent network

And industrious self

Recommended Today

Blog based on beego, go blog

Go Blog A beego based development, can quickly create personal blog, CMS system Include functions see Official website of go bloggo-blog.cn Demo siteleechan.online Update log time function January 23, 2020 New top post function February 2, 2020 New custom navigation function February 4, 2020 New site announcement function February 6, 2020 New link module February […]