Questions tagged [spring-data-redis]

Spring Data Redis, part of the larger Spring Data family, provides easy configuration and access to Redis from Spring applications. It offers both low-level and high-level abstractions for interacting with the store, freeing the user from infrastructural concerns.

Spring Data Redis, part of the larger Spring Data family, provides easy configuration and access to Redis from Spring applications. It offers both low-level and high-level abstractions for interacting with the store, freeing the user from infrastructural concerns.

Features

  • Abstraction across multiple Redis drivers/connectors such as Lettuce and Jedis.
  • JDK, String, JSON and Spring Object/XML mapping serializers.
  • Spring cache abstraction for use with Redis.
  • JDK Collection implementation on top of Redis.
  • Pub/Sub integration.
  • Reactive and imperative APIs.

Online Resources:

Version History

1029 questions
0
votes
1 answer

Spring Data JPA to Spring Data Redis - what all changes are needed?

I am new to Redis and trying to implement change Postgres DB into the Redis DB. Current implementation we've used Spring Data JPA (Entity Classes + JPA Repository). Now I wanted to use Spring Data Redis and backend as Redis In Memory DB. Could you…
Jeff Cook
  • 7,956
  • 36
  • 115
  • 186
0
votes
1 answer

java.lang.ClassCastException in Jetty when using Spring Session with Redis in combination with SseEmitter

I'm using Jetty 9.4 (but I've tried 9.2 as well), spring-data-redis 1.8.6 and Spring 4.2. I'm essentially using the default configuration provided by org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration and…
Johan
  • 37,479
  • 32
  • 149
  • 237
0
votes
1 answer

How are sorted sets stored in redis when set using Spring + Jedis?

I have a Spring 4.3.9 app w/ spring-data-redis (1.8.7) and jedis (2.9.0). I can easily set and retrieve a ZSET using the code as below: // Commented out -- but below line works fine too // redisTemplate.opsForZSet().remove("score", userId); Double…
Vik
  • 1,301
  • 4
  • 16
  • 29
0
votes
0 answers

redis key expire show -1 even it is set to 900 seconds

From past few days, I am facing this issue on live. I am maintaining a key in REDIS and each time system setting key in redis, It also set expire in it. But few days back, User start saying that system behaving different. After some search, I found…
Nik0990
  • 35
  • 6
0
votes
2 answers

Is there any ways to evict keys from Redis just after accessing it?

As per this answer [https://stackoverflow.com/a/17099452/8804776][1] "You might not know it, but Redis is actually single-threaded, which is how every command is guaranteed to be atomic. While one command is executing, no other command will…
Justin Mathew
  • 950
  • 8
  • 34
0
votes
1 answer

What needs to be changed to successfully move an XML configuration for spring-data-redis 1.8.15 to 2.1.0?

I'm attempting to update an existing application that makes use of spring-data-redis 1.8.15.RELEASE to the 2.1.0. RELEASE. This application uses an XML-based configuration and was created well before Spring Boot, so I'm not able to use…
rls
  • 57
  • 6
0
votes
1 answer

How to configure Redis Session in OAuth 2.0 Spring Boot?

I am new to Spring configuration to Redis session, I used following configuration for Redis org.springframework.data spring-data-redis
0
votes
1 answer

Data Replication from MySql to Redis Server

I`m using RedisTemplate provided by spring framework for In-Memory caching. And MySql as primary database. I need to update the cache whenever new row is added or updated in primary database. How can i accomplish this using java? Is there any…
0
votes
1 answer

AuthenticationSuccessEvent Listener for two spring applications connected through Shared Redis session

I am having two spring-boot application with shared session through Redis.. application-1 contains the login flow and application-2 uses the same session created on application-1, Now i wanted to listen to the successful authentication on…
Pradeep Reddy
  • 113
  • 1
  • 1
  • 9
0
votes
1 answer

Spring Data Redis with multi tenancy

I am using Spring Data Redis, with spring data abstraction not using directly RedisTemplate. My data model like below: @RedisHash(value = “products") public class Product { @Id @Indexed private String id; private String…
sam
  • 1,073
  • 4
  • 13
  • 27
0
votes
0 answers

Spring data redis get expiration time with crud interface

Is there anyway to get expiration time of redis model directly from spring data redis crud? I have tried this but i can't get expirationTime. @RedisHash(value = "products") public class Product { @Id @Indexed private String id; …
sam
  • 1,073
  • 4
  • 13
  • 27
0
votes
1 answer

can not load keys : scan commands not supported by redis server

I am working on the windows version of Redis server. Version is redis-2.4.5-win32-win64. I have started redis server: [4748] 14 Jul 19:12:32 # Warning: no config file specified, using the default config. In order to specify a config file use…
Jeff Cook
  • 7,956
  • 36
  • 115
  • 186
0
votes
1 answer

RedisSystemException: Unknown redis exception; nested exception is java.lang.NullPointerException

Currently, i'm trying to learn spring data redis I've create some test project and successfully insert the data, however i got an issue when using pipeline command this is my config file : public RedisTemplate redisTemplate(…
john doe
  • 3
  • 2
  • 4
0
votes
1 answer

Iterate different objects as String with RedisTemplate

I have different models keys in redis. I used these templates to store the values; public RedisTemplate model1RedisTemplate() { RedisTemplate redisTemplate = new RedisTemplate<>(); …
sam
  • 1,073
  • 4
  • 13
  • 27
0
votes
1 answer

Using Lettuce with RedisTemplate throws exceptions

I am trying to figure out why Lettuce is giving me so many problems while I'm running my performance tests comparing it to Jedis. I'm using spring-data-redis 1.8.11.RELEASE and I create custom proxy beans for interfaces to access redis through…
Jeremy Reed
  • 289
  • 7
  • 20