September 2019
Intermediate to advanced
668 pages
15h 59m
English
Making the MongoDB-based repositories for the product and recommendation services reactive is very simple:
The ProductRepository and RecommendationRepository look like the following after the change:
public interface ProductRepository extends ReactiveCrudRepository<ProductEntity, String> { Mono<ProductEntity> findByProductId(int productId);}public interface RecommendationRepository extends ReactiveCrudRepository<RecommendationEntity, String> { Flux<RecommendationEntity> findByProductId(int productId);}
No changes are applied to the persistence code ...