Skip to content

Add Static Factory Method for JacksonJsonRedisSerializer #3252

@vinsguru

Description

@vinsguru

Hi Team,
Hope it is a simple request.

Can we add a static factory method for creating instances of JacksonJsonRedisSerializer in V 4.0?

Example:

JacksonJsonRedisSerializer<Person> serializer = JacksonJsonRedisSerializer.of(Person.class);

Alternatively, a static helper under RedisSerializer would be even better.

static <T> RedisSerializer<T> json(Class<T> type) {
    return new JacksonJsonRedisSerializer<>(type);
}

RedisSerializer<Person> serializer = RedisSerializer.json(Person.class);

That would greatly simplify typical RedisTemplate setup code and make examples cleaner for both documentation and developer experience.
Adding a factory method improves readability and aligns with modern Java API design conventions.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions