Uploaded image for project: 'Spring Data Redis'
  1. Spring Data Redis
  2. DATAREDIS-820

Overriding of redisCustomConversions is restricted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Waiting for Feedback
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.8.11 (Ingalls SR11)
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            mp911de Mark Paluch
            Reporter:
            jgreen James Green
            Last updater:
            Mark Paluch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: