Spring Boot and MongoTemplate: How to Add Pagination to MongoDB Query Results This is a nice little hack.