Spring boot 带JSON转换器的Spring数据Redis给出;属性的路径不能为null或空。”;

Spring boot 带JSON转换器的Spring数据Redis给出;属性的路径不能为null或空。”;,spring-boot,spring-data,spring-data-redis,spring-repositories,spring-data-keyvalue,Spring Boot,Spring Data,Spring Data Redis,Spring Repositories,Spring Data Keyvalue,我正在尝试使用CRUDEPository与spring数据redis和莴苣相关联。根据我能找到的所有建议,我已经将我的spring boot 2.1.8应用程序配置为@ReadingConverters和@WritingConverters,但当我尝试使用存储库时,我得到的是“属性的路径不能为null或空” 在进行一些调试时,这似乎是由org.springframework.data.redis.core.convert.MappingRedisConverter:393 writeIntern

我正在尝试使用CRUDEPository与spring数据redis和莴苣相关联。根据我能找到的所有建议,我已经将我的spring boot 2.1.8应用程序配置为@ReadingConverters和@WritingConverters,但当我尝试使用存储库时,我得到的是“属性的路径不能为null或空”

在进行一些调试时,这似乎是由
org.springframework.data.redis.core.convert.MappingRedisConverter:393

writeInternal(entity.getKeySpace(), "", source, entity.getTypeInformation(), sink);
第二个参数是路径。这在运行此代码的
MappingRedisConverter
的第747行结束:

} else if (targetType.filter(it -> ClassUtils.isAssignable(byte[].class, it)).isPresent()) {
            sink.getBucket().put(path, toBytes(value));
}
最终,带有空路径的put会出现在
org.springframework.data.redis.core.convert.Bucket:77
中,并使
Assert.hasText(路径,“属性的路径不能为null或空”)失败即使数据已序列化

这是SpringDataRedis的一个bug还是我需要配置其他东西

redicconfig.java

@配置
@EnableConfigurationProperties({RedisProperties.class})
@所需参数构造函数
@启用可再发现存储库
公共类配置{
私有最终重新连接工厂重新连接工厂;
@豆子
公共RedisTemplate RedisTemplate(){
RedisTemplate=新RedisTemplate();
模板.setConnectionFactory(RedConnectionFactory);
template.afterPropertieSet();
返回模板;
}
@豆子
公共对象映射器对象映射器(){
ObjectMapper ObjectMapper=新的ObjectMapper();
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
objectMapper.configure(在未知属性上反序列化feature.FAIL,false);
objectMapper.findAndRegisterModules();
返回对象映射器;
}
@豆子

public RedisCustomConversions RedisCustomConversions(列表)我想这个问题解释了你有什么解决方案吗?我尝试过更新版本,但仍然失败。