Getting Started

Get started with Lettuce 5.1.6.RELEASE

You can get started with Lettuce in various ways:

1. Get it

For Maven users:

Add these lines to file pom.xml:


For Ivy users:

Add these lines to file ivy.xml:

    <dependency org="io.lettuce" name="lettuce-core" rev="5.1.6.RELEASE"/>

For Gradle users:

Add these lines to file build.gradle:

dependencies {
  compile 'io.lettuce:lettuce-core:5.1.6.RELEASE'

Plain Java

Download the latest binary package from and extract the archive.

2. Start coding

So easy! No more boring routines, we can start.

Import required classes:

import io.lettuce.core.*;

and now, write your code:

RedisClient redisClient = RedisClient.create("redis://[email protected]:6379/0");
StatefulRedisConnection<String, String> connection = redisClient.connect();
RedisCommands<String, String> syncCommands = connection.sync();

syncCommands.set("key", "Hello, Redis!");



Do you want to see working examples?