Tagged articles
Spring Data Redis
11 articles · Page 1 of 1
This tutorial demonstrates configuring Spring Data RedisTemplate using pure Java annotations, covering Maven dependencies, connection pooling, serialization, and CRUD operations for String, List, Hash, Set, and Sorted Set data types with complete code examples.
Annotation ConfigurationConnection PoolingJava
0 likes · 14 min read

The article explains how the old pattern of GET‑ing an entire JSON string from Redis, deserializing it in Java, modifying a single field and writing it back is inefficient and error‑prone, and shows how Spring Data Redis 4.2’s RedisJsonTemplate lets you update or read individual JSON paths directly, reducing code, network traffic and race‑condition risks.
CacheJSONJava
0 likes · 15 min read

This article introduces Spring Boot 4.1.0’s @RedisListener annotation, showing how it simplifies Redis Pub/Sub integration by eliminating boilerplate, supporting multiple topics, custom converters, and validation, with step‑by‑step code examples and CLI demonstrations.
@RedisListenerCustom ConverterMessage Listener
0 likes · 9 min read

This article explains the common Redis caching tools, introduces Spring Data Redis's bound operation APIs, and provides step‑by‑step configuration examples for RedisTemplate, helping developers choose and set up a Redis client in Java applications.
BoundOperationsConfigurationJava
0 likes · 3 min read

This article explains why traditional local locks fail in distributed systems, surveys common distributed‑lock approaches, and provides a step‑by‑step guide to building a robust Redis‑based lock in Java—including expiration handling, UUID safety, Lua‑script atomicity, re‑entrancy, automatic renewal, and the RedLock algorithm—while comparing its performance against plain local locks.
Distributed LockJavaLua
0 likes · 17 min read

Learn how to integrate Spring Data Redis with Spring Boot, replace Jedis with Lettuce, define data models using @RedisHash and @Indexed, configure connection properties, implement CRUD and example queries, and understand the underlying key-value storage patterns illustrated with practical code and visual examples.
CRUDJavaLettuce
0 likes · 13 min read

Lettuce, a thread‑safe, Netty‑based Java Redis client supporting synchronous, asynchronous, reactive, Cluster, Sentinel, pipelining and custom codecs, outperforms Jedis’s non‑thread‑safe pooled connections by reducing resource consumption, simplifying Spring integration, and offering advanced features like read‑write splitting, topology refresh, and optional pooling for high‑throughput applications.
JavaJedisLettuce
0 likes · 15 min read

This tutorial demonstrates how to use Redis SET operations and a Lua script to implement a lottery mechanism, and shows how to integrate the script into a Java Spring application using Spring Data Redis's RedisTemplate for atomic execution.
JavaLotteryLua
0 likes · 8 min read

This tutorial explains why in‑process caches like EhCache can cause consistency problems in clustered environments and demonstrates step‑by‑step how to replace EhCache with Redis in a Spring Boot 2.x application, including dependency setup, configuration, and a unit test that verifies caching behavior.
EhcacheJavaSpring Data Redis
0 likes · 7 min read

During a high‑traffic load test of an e‑commerce product detail page, excessive Redis cluster and PSETEX commands caused CPU spikes, and the investigation revealed that using millisecond‑level expiration in Spring Data Redis triggers frequent cluster node lookups, which can be resolved by switching to second‑level expirations.
ClusterSpring Data Redispsetex
0 likes · 11 min read

This comprehensive guide walks you through installing Redis on Linux and Windows, configuring Spring Cache annotations, setting up JSON serialization with RedisTemplate, using connection pools, and implementing a flexible RedisService with controller examples, providing all the essential steps to integrate Redis into your Spring Boot applications.
JavaRedisSpring Cache
0 likes · 25 min read
