Open mkowaliszyn-coursera opened 3 months ago
Wrong repo: GenericJackson2JsonRedisSerializer
is not part of Jackson so this needs to be filed somewhere else.
Looks like a Spring class.
To reiterate, this needs to be reported to Spring and not here.
Search before asking
Describe the bug
The
GenericJackson2JsonRedisSerializer
implementation does not permit the registration of modules with the existing implementation. Since this PR #4082 now blows up due to JDK8 Module being not registered between versions2.15.2
and2.16.0
where before serializingOptional
worked without the module (or the module was auto registered, not clear).The error thrown is:
The implementation should permit customization of the underlying ObjectMapper, but it only permits complete override or nothing. The package private implementations of the serializer make it impossible to extend or reconfigure.
The workaround is to use reflection to register the module:
Version Information
2.16.0+
Reproduction
This code uses private models, but conveys the gist of the problem: the model takes an
Optional
field. This worked prior to2.16.0
.Expected behavior
I can register the JDK8 module and other modules with
GenericJackson2JsonRedisSerializer
and other implementations provided.Additional context
No response