<Have multiple repositories for the same class in ...
# stackoverflow
u
Have multiple repositories for the same class in spring data mongodb So I have a data class x that I want to have 2 repositories for. Both repos Y and Z should be capable of storing Documents of type X. The problem is that when I use MongoRepository in both repos .. it assumes that the collection name is X. So I was hoping there is one way to rename the collection for the Repository ... or a better approach to what I want to do here