December 2019
Intermediate to advanced
494 pages
11h 41m
English
Open up Eclipse and create a new Gradle project. Install the Lettuce Redis framework by editing your build.gradle file, as follows:
apply plugin: 'java-library' repositories { jcenter() } dependencies { implementation 'biz.paluch.redis:lettuce:4.5.0.Final' }
Now, we will create the demo application:
package com.packtpub.azure // [...] public class AzureRedisConsoleApp { public static void main(String[] args) { String password = "your_password"; String host = "your_host"; int port = 6380; RedisURI uri = RedisURI.create(host, port); uri.setPassword(password); uri.setSsl(true); RedisClient client = RedisClient.create(uri); try (StatefulRedisConnection<String, String> connection = client.connect()) { RedisCommands<String, ...