RedisCustomConversions using Redis Repository

我的未来我决定 提交于 2020-06-01 05:08:49

问题


Is it possible to use custom Redis converters with Spring-Data Repository? I see the example in https://docs.spring.io/spring-data/data-redis/docs/current/reference/html/#redis.hashmappers.jackson2 but I get the following error when I try it.

@Bean definition illegally overridden by existing bean definition: Root bean: class 
[org.springframework.data.redis.core.convert.RedisCustomConversions]

My code to register the converter is

 @Bean
fun redisCustomConversions():RedisCustomConversions {
    return RedisCustomConversions(listOf(MyWriterConverter(), MyReaderConverter()))
}

for connection pool I am using LettuceConnectionFactory

any thoughts?

来源:https://stackoverflow.com/questions/61280275/rediscustomconversions-using-redis-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!