spring-data-valkey
Spring Data Valkey Integration
Use when integrating GLIDE with Spring Boot applications via Spring Data Valkey, configuring auto-wired connections, templates, caching, health indicators, and IAM authentication.
Routing
- ValkeyTemplate, StringValkeyTemplate, auto-configuration, repositories -> Auto-Configuration and Templates
- @Cacheable, @CacheEvict, @CachePut, Spring Cache, cache TTL -> Auto-Configuration and Templates
- Actuator, health indicator, health check -> Auto-Configuration and Templates
- Spring Data Redis, migration, RedisTemplate rename -> Migration and Comparison
- Driver comparison, Lettuce vs GLIDE, when to use -> Migration and Comparison
- Hybrid approach, direct GLIDE API -> Migration and Comparison
Overview
Spring Data Valkey is a dedicated Spring Boot integration for Valkey. It provides auto-configuration for connections, templates, repositories, and caching - with GLIDE as a first-class driver alongside Lettuce and Jedis.
The project lives at https://github.com/valkey-io/spring-data-valkey and is maintained by the Valkey community.
Maven Dependency
<dependency>
<groupId>io.valkey.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-valkey</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>io.valkey</groupId>
<artifactId>valkey-glide</artifactId>
<classifier>${os.detected.classifier}</classifier>
<version>2.3.0</version>
</dependency>
GLIDE requires platform-specific native libraries. Add the os-maven-plugin to resolve the classifier:
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.7.1</version>
</extension>
</extensions>
</build>
Supported Drivers
| Driver | Status | Use Case |
|---|---|---|
| GLIDE | Supported | Production - multi-language consistency, cluster reliability |
| Lettuce | Supported | Reactive/async workloads, existing Lettuce users |
| Jedis | Supported | Legacy compatibility, synchronous-only workloads |
Spring Data Valkey auto-detects the driver on the classpath. Explicit configuration:
spring.data.valkey.client-type=valkeyglide
# Options: valkeyglide, lettuce, jedis
Application Properties Configuration
Basic Connection
spring.data.valkey.host=localhost
spring.data.valkey.port=6379
spring.data.valkey.password=your-password
spring.data.valkey.database=0
spring.data.valkey.timeout=2000ms
Cluster Mode
spring.data.valkey.cluster.nodes=node1:6379,node2:6379,node3:6379
spring.data.valkey.cluster.max-redirects=5
TLS
spring.data.valkey.ssl.enabled=true
IAM Authentication (AWS ElastiCache / MemoryDB)
spring.data.valkey.host=your-cluster-endpoint.cache.amazonaws.com
spring.data.valkey.username=your-iam-user-id
spring.data.valkey.ssl.enabled=true
spring.data.valkey.client-type=valkeyglide
spring.data.valkey.valkey-glide.iam-authentication.cluster-name=your-cluster-name
spring.data.valkey.valkey-glide.iam-authentication.service=ELASTICACHE
spring.data.valkey.valkey-glide.iam-authentication.region=us-east-1
IAM auth requires TLS and the GLIDE driver. AWS credentials must be available in the environment. Token refresh is automatic.
OpenTelemetry via Spring Properties
spring.data.valkey.valkey-glide.open-telemetry.enabled=true
spring.data.valkey.valkey-glide.open-telemetry.traces-endpoint=http://otel-collector:4317
spring.data.valkey.valkey-glide.open-telemetry.metrics-endpoint=http://otel-collector:4317
Version Compatibility
| Spring Data Valkey | Spring Boot | GLIDE | Valkey | Java |
|---|---|---|---|---|
| 1.0.0 | 3.5.x | 2.3.x | 7.2+ | 17+ |
Reference
| Topic | File |
|---|---|
| ValkeyTemplate, StringValkeyTemplate, caching, Actuator health, repositories | auto-configuration |
| Spring Data Redis migration, driver comparison, when to use, hybrid approach | migration-and-comparison |
See Also
- valkey-glide-java skill - full GLIDE Java API details
- Production deployment (see valkey-glide skill) - timeout tuning, connection management, observability
- Error handling (see valkey-glide skill) - error types, reconnection, batch error semantics
More from avifenesh/valkey-skills
valkey
Use when building apps with Valkey - caching, sessions, queues, locks, rate-limiting, leaderboards, counters, pub-sub, streams, scripting. Covers IFEQ/DELIFEQ, hash field TTL, COMMANDLOG. Not for server internals (valkey-dev) or ops (valkey-ops).
5valkey-dev
Use when contributing to the Valkey server - C internals, event loop, commands, data structures, cluster, replication, RDB/AOF, memory, threading, modules, Lua, RESP, tests. Not for app development (valkey) or ops (valkey-ops).
5valkey-ops
Use when deploying, configuring, monitoring, or troubleshooting self-hosted Valkey. Covers Sentinel, cluster, persistence, replication, security, Kubernetes, performance tuning. Not for app development (valkey) or server internals (valkey-dev).
5valkey-ecosystem
Use when evaluating the Valkey ecosystem - client libraries, modules (JSON, Bloom, Search), managed services (AWS, GCP, Aiven), monitoring tools, frameworks (Spring, Django, Rails), Docker/Kubernetes deployment, CI/CD patterns, migration from Redis, and developer tooling.
5glide-mq
Use when building message queues with glide-mq. Covers queue setup, producer/consumer patterns, job scheduling, workflows, batch processing, streaming, and suspend/resume. Not for migrating from BullMQ (migrate-bullmq) or Bee-Queue (migrate-bee).
4valkey-glide
Router for Valkey GLIDE per-language skills. Use when you need to find the right language-specific GLIDE skill or migration skill. Not for GLIDE library internals or contributing to GLIDE source code - use glide-dev instead.
4