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

Expose GenericJackson2JsonRedisSerializer.registerNullValueSerializer() for ObjectMapper customization

    Details

      Description

      When I want to customize the ObjectMapper, for example, set the feature function to open, use the customized ObjectMapper, but the function of NullValueSerializer is lost, because the class is private, because the GenericJackson2JsonRedisSerializer is used, you can serialize and deserialize without specifying the class. , if it is a custom ObjectMapper, also specify the NullValueSerialize function

      In combination with spring-session, or other spring functions, some classes do not have a no-argument constructor. You must customize the ObjectMapper and support the NullValueSerializer function.

       

      Good design principles, should not be aware of the details inside the class, but if I customize the ObjectMapper now, the property that generates @class is not specified. In fact, GenericJackson2JsonRedisSerializer will report an error and cannot reflect his role.

        Attachments

          Activity

            People

            • Assignee:
              mp911de Mark Paluch
              Reporter:
              tofdragon tofdragon
              Last updater:
              Christoph Strobl
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: