spring-data-redis
spring-data-redis copied to clipboard
IndexConfiguration not get updated if multiple @EnableRedisRepository available [DATAREDIS-818]
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)