You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some applications it's required to change the readPreference for one or more repository (and keep it distinct from a default ReadPreference set on MongoTemplate).
A mechanism similar to WriteConcernResolver would make this very flexible and achieve this functionality.
Currently there are two workarounds which are not very clean:
Creating repository in question with a different MongoTemplate (does not allow per-action preferences changes)
Subclassing MongoTemplate and hooking in desired functionality there