July 2018
Intermediate to advanced
336 pages
9h 23m
English
With the domain model implemented successfully, CrudRepository for those can be implemented using Spring Data Redis. The specialty here is that there is no need to implement anything. Just writing an interface that extends from the CrudRepository interface would be sufficient to expose methods to find one, find all, save, delete, and so on. The following code shows the TaxiRepository, which is available in the spring-boot-2-taxi-service:
@Repositorypublic interface TaxiRepository extends CrudRepository<Taxi, String> {}
The @Repository annotation is used to mark this interface as a data repository component of Spring. The following code shows TaxiBookingRepository, which is available in spring-boot-2-taxi-book-service ...
Read now
Unlock full access