July 2018
Intermediate to advanced
336 pages
9h 23m
English
The following code is the TaxiController, which caters to the registering, searching, status updating, and so on, of Taxis; it is available in spring-boot-2-taxi-service:
@RequestMapping("/taxis")@RestControllerpublic class TaxiController { private final TaxiService taxiService; public TaxiController(TaxiService taxiService) { this.taxiService = taxiService; } @GetMapping public Flux<TaxiAvailableResponseDTO> getAvailableTaxis(@RequestParam("type") TaxiType taxiType, @RequestParam("latitude") Double latitude, @RequestParam("longitude") Double longitude, @RequestParam(value = "radius", defaultValue = "1") Double radius) { Flux<GeoResult<RedisGeoCommands.GeoLocation<String>>> availableTaxisFlux = taxiService ...