Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Browsing all 2203 articles
Browse latest View live
↧

Spring session vs cookie session

I have created a simple application in Spring. I'm using Spring Security, Spring Session and store session in Redis. Everything works properly, session is saved, and it is valid until I close browser....

View Article


Redis consumer unable to consume a particular event

I have a producer in a spring boot project that is producing two events to the same redis consumer group and a consumer (another spring boot project) consuming the same. The redis consumer is able to...

View Article


How to enable caching in a Spring boot application by using Mongo as database...

I am trying to understand how to use the spring boot caching framework that has annotations such has @EnableCaching and @Cacheable to combine both Mongo and Redis. Let's assume I have two DAO layers...

View Article

java 11 spring boot2 redis runtime exception

I migrate from java 8 to java 11, the compilation goes well,but when running the spring boot 2 application with a version jedis 3.0.0, I have the following error:Caused by:...

View Article

How to achieve the following behavior by using the @Cacheable annotation?

Let's assume that I have a method that fetches data from Mongo which can be cached into redis.@Cacheablepublic List<Values> cacheValues(List<String> input){ // code that fetches the list...

View Article


Spring Boot Redis Caching Creating Many New Redis Connections

I am using the built in Spring Boot 1 Redis library with the @Cacheable annotation to cache some values in Redis. The Redis cluster is hosted in AWS and is unclustered with SSL and password enabled.An...

View Article

How to store ArrayList in Redis caching?

I am trying to store Arraylist values which coming from DB to Redis Client . But Redis have only Key/Value methods the Key/Value must be String format. How can i store Key as String and Values As...

View Article

How does @cacheable store data in redis

I want to understand how cacheable stores data in redis. Let's say I have a method with the cacheable sintax and redis is the caching database:@Override @Cacheable(cacheNames = y, key = "'z'") public...

View Article


Redis connection - 'Could not get a resource from the pool'

I am using redis in pubsub model with following code@Value("${redis.server.host}")private String redisServerHost;@Value("${redis.server.port}")private int...

View Article


Can retrieve values manually set in redis-cli but unable to set new keys...

I'm using Spring Webflux + Reactive Redis, my goal is to use Redis as a file cache.I was trying to set a key with a ~100MB ByteBuffer at first, didn't work. I double-checked with the debugger to make...

View Article

org.springframework.data.redis.RedisConnectionFailureException: Could not get...

My cassandra docker-compose file:version: '2'services: redis-node-0: image: docker.io/bitnami/redis-cluster:latest ports: - "6370:6379" environment: - 'REDIS_PASSWORD=pass' - 'REDIS_NODES=redis-node-0...

View Article

Java - Spring Boot - Reactive Redis Stream ( TEXT_EVENT_STREAM_VALUE )

I want to write an endpoint which always shows the newest messages of a redis stream (reactive).The entities look like this {'key' : 'some_key', 'status' : 'some_string'}.So I would like to have the...

View Article

How can i use redisService inside a spock test i need to cleanup the redis...

I have a class that stores a value in redis. When i test it, it works properly. If i run it for the second tome it will fail as there is an entry on redis already. I want to cleanup the redis database...

View Article


Expired key cluster mode - Spring data Redis

I'm trying to listen for the expiration events in the different nodes of my Redis cluster. The Redis cluster has 3 master nodes. For some reason, the application is only subscribed to one random Redis...

View Article

Adding arrays as Kubernetes environment variables

I'm working on a Java Play project, and in my application.conf file I have a Redis cluster set-up that receives an array of Redis server nodes.Now, I want to inject that value in Kubernetes deployment...

View Article


Difference between CrudRepository and RedisTemplate's HashOperations

So, I started learning Redis and I am using Spring Boot Data Redis as shown in this article. When I call the findAll method of UserRepository it returns all the Users saved via the save method of...

View Article

Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer'...

i'm trying to run Maven Spring application using Redis+ MYSQL, but i unable to run the app due to this error, i've been searching all over the web for proper answer but misfind.Error starting...

View Article


Cache data with lua script, but getting RedisCommandExecutionException with...

I have a map data to cache in redis cluster using lua script in springboot project, such as:{"demoKey:{1}":"value1","demoKey:{2}":"value2","demoKey:{3}":"value3"}lua script like this:local addMap =...

View Article

Serializing two objects within the same JSON and then deserializing them from...

We are having some issues with jackson at my development team.Some non-important contextWe are pretty new with jackson and we had several issues over the past, but we always had tried to solve them...

View Article

Why isn't my Redis cache working in my Spring-Boot/Spring-Data application?

I'm adding a local Redis cache to my Spring-Boot/Spring-Data application. As far as I can tell, the cache should work if I do three things:I've annotated my application class with...

View Article
Browsing all 2203 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>