I recently upgraded my app from Spring boot 3.0.6 to 3.2.2.I have a batch process that is partitioned and using MongoItemReader. After upgrade MongoItemReader shows deprecated and Spring suggest to use MongoPagingItemReader. But after upgrade, the methods setTemplate,setQuery and setTargetType are showing deprecated as these are inherited methods from MongoItemReader.
Below is the screenshot of the reader.
I tried to use something similar to JdbcPagingItemreader but there is no queryprovider for mongoDB.
Appreciate any help on how to use MongoPagingItemReader without any deprecated methods.

These deprecations should disappear when the deprecated
MongoItemReaderwill be removed (in Spring Batch 5.3+). But this is currently incorrect and those inherited methods should not be marked as deprecated inMongoPagingItemReader.I created an issue for that: https://github.com/spring-projects/spring-batch/issues/4552. It will be fixed in the next patch release v5.1.1.