July 2018
Intermediate to advanced
268 pages
7h 36m
English
To make it separate from our existing functional-based programming, we have created a new controller that will expose some of the methods in a RESTful way, using the newly created ReactiveMovieRepository:
@RestControllerpublic class MovieController { @Autowired private ReactiveMovieRepository reactiveMovieRepository; @GetMapping("/movies") public Flux<Movie> getAllMovies() { return reactiveMovieRepository.findAll(); } @GetMapping("/movies/{genre}") public Flux<Movie> getAllMoviesByGenre(@PathVariable String genre) { return reactiveMovieRepository.findByGenre(genre); } @GetMapping("/movies/{title}/{genre}") public Flux<Movie> getAllMoviesByTitleAndGenre (@PathVariable String title, @PathVariable String genre) { return ...Read now
Unlock full access