How to write the following mongo query in springboot?

query –

db.collection.find().sort({$natural: -1 }).limit(5)

I was basically finding the most recent documents in the collection. But how should I write this query in springboot?