Skip to content

Overriding of redisCustomConversions is restricted [DATAREDIS-820] #1393

Open
@spring-projects-issues

Description

@spring-projects-issues

James Green opened DATAREDIS-820 and commented

This is one of those "it was working last week I swear" issues.

We are storing a JSON formatted value in a hash and so need to override redisCustomConversions to add the plumbing. In a previous iteration we had two classes:

  1. RedisConfiguration. We added @Configuration and @EnableRedisRepositories. Otherwise this class was empty.
  2. SubscriptionsConfiguration. We added @Configuration and a method annotated @Bean that produced a CustomConversions instance named redisCustomConversions.

Last Friday we noticed in local testing the results of the query were now blank. The logs indicated that the redisCustomConversions were ignored because there was already a bean with that name. I was unable to fix with @Order or @Priority.

As part of our stab-it-until-it-works-again measures we eventually moved the redisCustomConversations method into the RedisConfiguation class, and the local tests burst back to life.

So either there was something nasty on my dev workstation or there's a restriction requiring that bean to be declared within the class annotated @EnableRedisRepositories which I don't see documented. Either way some advice on whether this should be worked on as a bug / clarified in the docs, or "user error" would be good to see to wrap it up


Affects: 1.8.11 (Ingalls SR11)

Metadata

Metadata

Assignees

Labels

in: coreIssues in core supporttype: bugA general bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions