With @Repository we have a comfortable solution to declare a Spring Data Repository as a bean (via component scanning). For projects having a single mongoTemplate for example this works quite well. When we have multiple mongoTemplates in a project there is no other way than declaring the base packages in an additional @Configuration, like this:
When we create another repository in org.foo.bar.domain2, we have to add this base package to the component scan. In a more complex project the amount of @Configuration classes for DB configurations is rapidly growing sometimes.
I found it intuitive to declare a reference to a mongoTemplate (only speaking for MongoDB for now, should work for JPA,... as well) in the @Repository annotation. As a possible solution a @MongoRepository (extending @Repository) could be introduced - having an attribute mongoTemplate. With this method we could avoid adding new base packages to the component scan manually and reduce the amount of @Configuration classes.