It is a good practice to encapsulate business logic inside Service methods so that controllers and repositories are loosely coupled. The following is a Service written for encapsulating business logic for Taxi, and is available in spring-boot-2-taxi-service:
@Servicepublic class TaxiService { private final ReactiveRedisTemplate<String, String> reactiveRedisTemplate; private final TaxiRepository taxiRepository; private final LocationToPointConverter locationToPointConverter = new LocationToPointConverter(); public TaxiService(ReactiveRedisTemplate<String, String> reactiveRedisTemplate, TaxiRepository taxiRepository) { this.reactiveRedisTemplate = reactiveRedisTemplate; this.taxiRepository