|
20 | 20 | import java.util.Collection;
|
21 | 21 |
|
22 | 22 | import org.junit.jupiter.api.Test;
|
23 |
| - |
24 | 23 | import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
25 | 24 | import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
26 | 25 | import org.springframework.beans.factory.support.SimpleBeanDefinitionRegistry;
|
|
33 | 32 | import org.springframework.data.keyvalue.repository.KeyValueRepository;
|
34 | 33 | import org.springframework.data.redis.core.RedisHash;
|
35 | 34 | import org.springframework.data.redis.core.RedisKeyValueAdapter.EnableKeyspaceEvents;
|
| 35 | +import org.springframework.data.redis.repository.RedisRepository; |
36 | 36 | import org.springframework.data.repository.Repository;
|
37 | 37 | import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource;
|
38 | 38 | import org.springframework.data.repository.config.RepositoryConfiguration;
|
@@ -65,6 +65,12 @@ void isStrictMatchIfRepositoryExtendsStoreSpecificBase() {
|
65 | 65 | assertHasRepo(StoreRepository.class, extension.getRepositoryConfigurations(configurationSource, loader, true));
|
66 | 66 | }
|
67 | 67 |
|
| 68 | + @Test // GH-2816 |
| 69 | + void isStrictMatchIfRepositoryExtendsRedisSpecificBase() { |
| 70 | + assertHasRepo(KeyValueSpecificRepository.class, |
| 71 | + extension.getRepositoryConfigurations(configurationSource, loader, true)); |
| 72 | + } |
| 73 | + |
68 | 74 | @Test // DATAREDIS-425
|
69 | 75 | void isNotStrictMatchIfDomainTypeIsNotAnnotatedWithDocument() {
|
70 | 76 |
|
@@ -197,5 +203,8 @@ interface SampleRepository extends Repository<Sample, Long> {}
|
197 | 203 |
|
198 | 204 | interface UnannotatedRepository extends Repository<Object, Long> {}
|
199 | 205 |
|
200 |
| - interface StoreRepository extends KeyValueRepository<Object, Long> {} |
| 206 | + interface StoreRepository extends RedisRepository<Object, Long> {} |
| 207 | + |
| 208 | + interface KeyValueSpecificRepository extends KeyValueRepository<Object, Long> {} |
| 209 | + |
201 | 210 | }
|
0 commit comments