spring-projects / spring-projects/spring-data-redis
IndexConfiguration not get updated if multiple @EnableRedisRepository available [DATAREDIS-818]
@christophstrobl is already working on this.
Since Dec 30, 2020.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Yan Ma opened DATAREDIS-818 and commented
I have multiple modules in a project. Each module has their own Redis repositories and auxiliary indexes defined in a class which extends org.springframework.data.redis.core.index.IndexConfiguration. Each module has their own java configuration file, which has annotation @EnableRedisRepositories (indexCongiruation=XXXXIndexConfiguration.class)
I observed that once the first IndexConfiguration class got loaded, it just skip all the other IndexConfiguration classes. This is causing the auxiliary indexes in the other modules are not available.
For example, module A has repository A and indexConfiguration set A, module B has repository B and indexConfiguration B. Both of them have their own java configuration file where @EnableRedisRepositories(indexConfiguration = XXXXIndexConfiguration.class) is used to load repositories and indexes. Both repository A and B are loaded successfully but only indexConfiguration set A got loaded into the system. indexConfiguration set B got ignored totally.
The workaround is that put all the data model and indexConfiguration settings into a single module but it violate the rule of data segregation. Pls help on this
Affects: 1.8.11 (Ingalls SR11)
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.
Assessment
This issue has not been assessed yet.