I'm trying to understand reactive part of spring 5. I have created simple rest endpoint for finding all entities using spring web-flux and spring data reactive (mongo) but don't see any way how to implement pagination.
Here is my simple example in Kotlin:
@GetMapping("/posts/")
fun getAllPosts() = postRepository.findAll()
Does it mean that reactive endpoint does not require pagination? Is some way to implement pagination from server side using this stack?
The reactive support in Spring Data does not provide means of a
Pagereturn type. Still, thePageableparameter is supported in method signatures passing onlimitandoffsetto the drivers and therefore the store itself, returning aFlux<T>that emits the range requested.For more information please have a look at the current Reference Documentation for 2.0.RC2 and the Spring Data Examples.