Skip to content

Commit f922b8d

Browse files
committed
DATAMONGO-1444 - Make Project Reactor dependency no longer required for blocking repository usage.
Use ReactiveWrapperConverters for reactive wrapper type conversion to not require Project Reactor for blocking repository usage.
1 parent 91d4172 commit f922b8d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/support/ReactiveMongoRepositoryFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ public ReactiveMongoRepositoryFactory(ReactiveMongoOperations mongoOperations) {
7878
this.mappingContext = mongoOperations.getConverter().getMappingContext();
7979

8080
DefaultConversionService conversionService = new DefaultConversionService();
81-
QueryExecutionConverters.registerConvertersIn(conversionService);
81+
ReactiveWrapperConverters.registerConvertersIn(conversionService);
82+
8283
this.conversionService = conversionService;
8384
setConversionService(conversionService);
8485
}

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/repository/query/ReactiveStringBasedMongoQueryUnitTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import org.springframework.data.repository.core.support.DefaultRepositoryMetadata;
5050
import org.springframework.data.repository.query.DefaultEvaluationContextProvider;
5151
import org.springframework.data.repository.util.QueryExecutionConverters;
52+
import org.springframework.data.repository.util.ReactiveWrapperConverters;
5253
import org.springframework.expression.spel.standard.SpelExpressionParser;
5354

5455
import reactor.core.publisher.Flux;
@@ -250,7 +251,7 @@ public void shouldSupportNonQuotedBinaryDataReplacement() throws Exception {
250251
private ReactiveStringBasedMongoQuery createQueryForMethod(String name, Class<?>... parameters) throws Exception {
251252

252253
DefaultConversionService conversionService = new DefaultConversionService();
253-
QueryExecutionConverters.registerConvertersIn(conversionService);
254+
ReactiveWrapperConverters.registerConvertersIn(conversionService);
254255

255256
Method method = SampleRepository.class.getMethod(name, parameters);
256257
ProjectionFactory factory = new SpelAwareProxyProjectionFactory();

0 commit comments

Comments
 (0)