spring-projects / spring-projects/spring-data-redis
Support redis specific repository.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing KeyValueRepository and the repository identification logic used by Spring Data Redis. Determine where a Redis-specific repository interface belongs and verify that repositories extending it are bound to Redis rather than another KeyValueRepository implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100