Redis的Java客户端工具lettuce的连接
1.开启Redis
[root@localhost redis-6.2.6]# src/redis-server redis.conf
2.添加依赖 3.编写Java代码
public class lettuceDemo {
public static void main(String[] args) {
//注意:密码写在连接地址中
RedisClient redisClient = RedisClient.create("redis://[email protected]");
StatefulRedisConnection
RedisCommands
共有 0 条评论