This repository contains a sample of configuring a Spring Boot client application to use a Redis server with SSL/TLS.
The source code for the sample is from Spring Guides.
The Redis SSL/TLS configuration is derived from https://github.com/allen-munsch/docker-redis-ssl-example.
Generate client and server SSL certificates with a root certificate authority and copy them to the server and application:
./scripts/gen-redis-certs.sh
Build and run the application:
./gradlew bootRun
The project includes a docker-compose.yml
file to start the Redis server in a Docker container.
You don’t need to manually run docker compose up
, as Spring Boot will do that for you.
If successful, you will see two messages at the end of the log output containing:
Sending message...
Received <Hello from Redis!>