July 2018
Intermediate to advanced
268 pages
7h 36m
English
We will create a new repository, ReactiveMovieRepository, with our two curated methods and all of the default methods provided by our extended class:
@Repositorypublic interface ReactiveMovieRepository extends ReactiveMongoRepository<Movie, Long> { @Query("{ 'title': ?0, 'genre': ?1}") Flux<Movie> findByTitleAndGenre(String title, String genre); @Query("{ 'genre': ?0}") Flux<Movie> findByGenre(String genre);}
We will extend our repository from ReactiveMongoRepository. ReactiveMongoRepository has loads of common methods that can be used right away, without any trouble. The methods that we have implemented use plain queries against the MongoDB and return the list.
Read now
Unlock full access