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.