Skip to content

Support redis specific repository. #2816

Open
@junghoon-vans

Description

@junghoon-vans

Previously, we were only specifying KeyValueRepository as the IdentifyingTypes of the repository.
This can be problematic when used with another implementation of KeyValueRepository,
so we need to provide a Redis-specific repository interface.

For example, if you have an implementation of a KeyValue named AnotherKV, as shown below,
Spring Data will not be able to determine which datastore it should run to.

interface MyRedisRepository extends KeyValueRepository<User, Long> { }
interface MyAnotherKVRepository extends KeyValueRepository<User, Long> { }

If Redis-specific repositories were added, this confusion could be eliminated.

interface MyRedisRepository extends RedisRepository<User, Long> { } // This always works with Redis.

By providing a module-specific repository, we can ensure that the repository is bound to a redis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions