Spring 5 introduces the reactive programming style for rest APIs with webflux. I\'m fairly new to it myself and was wondering wether wrapping synchronous calls to a database
Based on this blog you should rewrite your snippet in following way
@GetMapping(value = "/v1/measurements") public Flux getMeasurements() { return Flux.defer(() -> Flux.fromIterable(repository.findByFromDateGreaterThanEqual(new Date(1486980000L)))) .subscribeOn(Schedulers.elastic()); }