Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Spring Data MongoDB Reactive repositories #11

Merged
merged 1 commit into from
Jun 28, 2016
Merged

Integrate Spring Data MongoDB Reactive repositories #11

merged 1 commit into from
Jun 28, 2016

Conversation

mp911de
Copy link
Contributor

@mp911de mp911de commented Jun 13, 2016

This PR integrates with Spring Data MongoDB reactive repositories.

Spring Data exposes reactive repositories using Project Reactor and RxJava types. Spring Data allows RxJava, Project Reactor or mixed repositories.

public interface ReactiveMongoRxJavaPersonRepository extends RxJavaCrudRepository<Person, String> {

}

public interface ReactiveMongoPersonRepository extends ReactiveCrudRepository<Person, String> {

}

public interface ReactiveMongoRxJavaPersonRepository extends RxJavaCrudRepository<Person, String> {

    Flux<Person> findByLastname(String lastname);

    Single<Person> findByFirstnameAndLastname(String firstname, String lastname);
}

Spring Data MongoDB Branch: issue/DATAMONGO-1444
Requirements: MongoDB ReactiveStreams driver 1.2.0, Project Reactor 2.5.0.M4
Artifact coordinates:

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-mongodb</artifactId>
    <version>2.0.0.DATAMONGO-1444-SNAPSHOT</version>
</dependency>

Please note that the project fails with HTTP/1.1 500 Internal Server Error and Caused by: org.springframework.web.server.UnsupportedMediaTypeStatusException: Request failure [status: 415, reason: "Content type 'application/json' not supported"]

PostgresPersonRepository and CouchbasePersonRepository are based on Project Reactor 2.5.0.M3 and need to be migrated from .after() to .then().

@sdeleuze sdeleuze merged commit db7f260 into sdeleuze:master Jun 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants