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

Refreshing RedisTemplate

I am using spring quartz job to connect to Redis to perform a operation. I have configured the RedisTemplate to connect to only the master node. When failover happens in Redis and new master is elected I am notified via client-reconfig-script in…
Ravi
  • 53
  • 7
0
votes
0 answers

Why spring-data-redis JedisClusterConnection does not supports pipeline for Redis Cluster?

We are using spring-data-redis and Jedis for our application. We require some hmget for multiple keys in single request on Redis Cluster then we tried to do it with pipeline feature. But we found that spring-data-redis does not supports the pipeline…
saurabhygk
  • 35
  • 9
0
votes
1 answer

Spring data redis repository doesn't support collection query?

We can do 'findByXXsIn' in spring data JPA, but it seems that I failed to do this in spring data Redis, is there an alternative to do this? I tagged an object, and store the relation in Redis(tagId,targetId,targetType). public interface…
user2926474
  • 1
  • 1
  • 2
0
votes
1 answer

How is RedisTemplate injected into XXOperations(HashOperations ect.) using spring data (redis)

I am using Spring Data Redis but the official docs confused me:
xuhang
  • 1
  • 2
0
votes
1 answer

Spring Data Redis NullPointerException with @Cacheable

What is the cause of this null pointer in the framework code? I recently started migrating some of our application stack from ehcache with JGroups to Redis. As part of this, we are maintaining the use of ehcache as a second level cache for some…
Jeff
  • 45
  • 2
  • 8
0
votes
1 answer

Is this a Spring Data Redis cluster performance issue?

I have following code: @SpringBootApplication @Component public class ProductApiApplication2 implements CommandLineRunner{ @Resource private StringRedisTemplate stringRedisTemplate; @Override public void run(String... args) throws…
Alex
  • 1
0
votes
1 answer

Spring configuration for Radis, how the beans get wired?

In the following example from Getting started guide of Spring how the container bean gets connectionFactory? Does Spring Boot supplies a connectionFactory on its own? Getting Started Messaging with Spring Redis There are 5 beans…
Subhendu Mahanta
  • 961
  • 1
  • 18
  • 44
0
votes
1 answer

Spring-data-redis with redis after a while get Exception: could not get a resource from the pool

I'm using spring-data-redis to access redis(one machine) with xml config file, on beginning, everything is ok, but after some minutes, i run my test again, i got "could not get a resource from the pool" exception, i haved searched some answers, i…
PPTV
  • 1
  • 1
0
votes
1 answer

is spring-data-redis (opsForHash) get the same as hgetall?

I was doing the interactive tutorial al http://try.redis.io. while reading the spring data redis I have not come across that method but came across a get (without the "all") /** * Get value for given {@code hashKey} from hash at {@code key}. * *…
0
votes
1 answer

Is transaction (multi, exec) supported in spring data redis in a cluster mode?

I had implemented (and tested) transaction operation in redis using multi and exec functionality in a single REDIS instance successfully. However, the same code running in a cluster setup erroring out with the following exception message. I am using…
0
votes
0 answers

RedisTemplate use keys operation redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream occurs

When I use redisTemplate.keys to get match pattern keys. One Exception occurs. But when I run 'keys' command in my redis server , it works. Here is the stack trace below. Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected…
Gabriel.ge
  • 168
  • 3
  • 15
0
votes
1 answer

How to make cache data(on redis) to expire on basis of last access?

I have spring micro-service application which using redis-server for cache store. Using RedisCacheManager Api. In this we have option to set "setDefaultExpiration". Because of that rediscachemanager calculating expiry from first access of annotated…
0
votes
1 answer

kryo serialization - Error during Java serialization

My application has bunch of domain objects which get serialized into Redis store through spring-session. I'm trying to use Kryo (4.0.0) for automatic serialization without making objects explicitly serializable. I'm getting the following error…
0
votes
1 answer

Dynamically creating RedisTemplate for connecting with different Redis server

My application is built on spring boot and is backed by Redis datastore. Currently I have a connection only to a single redis server and the properties of that server ( host / port ) is defined in bootstrap.yml. I want to support multi-tenancy by…
krajwade
  • 133
  • 1
  • 12
0
votes
0 answers

get all data from redis seems slowly

Use spring-data-redis, when I do this action hashOperations = redisTemplate.opsForHash(); return hashOperations.values(this.getEntityClass().getName()); //or use this,the same //return…
doubleevil
  • 41
  • 2