skip to Main Content

Set connection parameters in RedisConnectionFactory

I have simple Redis client based on Spring below. As default it connects to local host, but I need to set different host and port. I suppose I can do it in function below: @Bean RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory,MessageListenerAdapter listenerAdapter) {…

VIEW QUESTION

Redis – java.lang.IllegalAccessException: class io.netty.util.internal.PlatformDependent0$6

I was trying to implement Redis caching for SpringBoot app which exposes Rest API. Important code snippets and maven build file enclosed. Start-up annotations: @SpringBootApplication @EnableAsync @EnableScheduling @EnableCaching public class Application { pom.xml(Only relevant dependencies listed) : <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId>…

VIEW QUESTION

NotSerializableException with redisson-spring-boot-starter

I'm using redisson-spring-boot-starter 3.13.2 and Kotlin for cache but I get the following exception: java.lang.IllegalArgumentException: java.io.NotSerializableException: com.service.message.State at org.redisson.RedissonObject.encodeMapValue(RedissonObject.java:338) at org.redisson.RedissonMapCache.fastPutOperationAsync(RedissonMapCache.java:843) at org.redisson.RedissonMapCache.fastPutAsync(RedissonMapCache.java:746) at org.redisson.RedissonMapCache.fastPut(RedissonMapCache.java:720) at org.redisson.spring.cache.RedissonCache.put(RedissonCache.java:107) at org.springframework.cache.interceptor.AbstractCacheInvoker.doPut(AbstractCacheInvoker.java:87) at org.springframework.cache.interceptor.CacheAspectSupport$CachePutRequest.apply(CacheAspectSupport.java:820) at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:429) at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:345) at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at…

VIEW QUESTION

Make Redis as optional

I am using spring boot with Redis.Redis is running as Docker container spring.cache.type=redis spring.redis.host=localhost spring.redis.port=6379 Redis is a memory DB, if it finds data in Redis based on the key, it retrieved from Redis otherwise go into actual db call.…

VIEW QUESTION
Back To Top
Search