Skip to content

Commit ebce1c2

Browse files
DATAREDIS-425 - Use createRepositoryFactory introduced by DATAKV-123.
Follow changes introduced in the spring-data-keyvalue module.
1 parent b195fb2 commit ebce1c2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/java/org/springframework/data/redis/repository/support/RedisRepositoryFactoryBean.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015 the original author or authors.
2+
* Copyright 2015-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,9 +18,10 @@
1818
import java.io.Serializable;
1919

2020
import org.springframework.beans.factory.FactoryBean;
21+
import org.springframework.data.keyvalue.core.KeyValueOperations;
2122
import org.springframework.data.keyvalue.repository.support.KeyValueRepositoryFactoryBean;
2223
import org.springframework.data.repository.Repository;
23-
import org.springframework.data.repository.core.support.RepositoryFactorySupport;
24+
import org.springframework.data.repository.query.parser.AbstractQueryCreator;
2425

2526
/**
2627
* Adapter for Springs {@link FactoryBean} interface to allow easy setup of {@link RedisRepositoryFactory} via Spring
@@ -37,10 +38,11 @@ public class RedisRepositoryFactoryBean<T extends Repository<S, ID>, S, ID exten
3738

3839
/*
3940
* (non-Javadoc)
40-
* @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#createRepositoryFactory()
41+
* @see org.springframework.data.keyvalue.repository.support.KeyValueRepositoryFactoryBean#createRepositoryFactory(org.springframework.data.keyvalue.core.KeyValueOperations, java.lang.Class)
4142
*/
4243
@Override
43-
protected RepositoryFactorySupport createRepositoryFactory() {
44-
return new RedisRepositoryFactory(getOperations(), getQueryCreator());
44+
protected RedisRepositoryFactory createRepositoryFactory(KeyValueOperations operations,
45+
Class<? extends AbstractQueryCreator<?, ?>> queryCreator) {
46+
return new RedisRepositoryFactory(operations, queryCreator);
4547
}
4648
}

0 commit comments

Comments
 (0)