Currently, usage of JdkSerializationRedisSerializer is harcoded for values in RedisAutoConfiguration and RedisReactiveAutoConfiguration. Even if I am not a Redis expert, the usage of GenericJackson2JsonRedisSerializer instead seems to be a common use case. For example, Kotlin data classes are not Serializable so Kotlin developers can't setup such configuration, leading to artificial customization of each RedisTemplate or ReactiveRedisTemplate. Even for Java that seems a reasonable use case.

Maybe RedisAutoConfiguration and RedisReactiveAutoConfiguration could allow configuration of a RedisSerializer bean with a specific bean name for the valueSerializer?

cc @mp911de @christophstrobl

Comment From: sdeleuze

After more experiment, Spring Data Redis works differently than expected, I prefer to close this issue for now.

Comment From: sivaprasadreddy

Hi @sdeleuze In most of the SpringBoot applications I worked with, Redis Cache is being configured to write/read as JSON instead of using default JdkSerializationRedisSerializer. I thought of creating an Issue to make it configurable but found this issue which describes exactly what I wanted to.

This seems to be a very useful feature to have. May I know why it is closed? If possible can you re-open it?