title: Spring-Data: specify which MongoTemplate a MongoRepository should use
body: <p>The following configuration is given:</p>
  
  <pre><code>@Configuration
  public class AppConfiguration {
  
    @Bean
    Mongo mongo() throws UnknownHostException {
      return new Mongo("localhost");
    }
  
    @Bean(name = "MovieTemplate")
    MongoTemplate beagleTemplate(Mongo mongo) {
      return new MongoTemplate(mongo, "MovieDatabase");
    }
  
    @Bean(name = "AnotherTemplate")
    MongoTemplate tmdbTemplate(Mongo mongo) {
      return new MongoTemplate(mongo, "AnotherDatabase");
    }
  }
  </code></pre>
  
  <p>I need a repository to access movies, which looks kinda like this:</p>
  
  <pre><code>@Repository
  public interface MoviesRepository extends
      MongoRepository&lt;ProductPages, String&gt; {
  
      ... some method declarations to access movies ...
  }
  </code></pre>
  
  <p>Is there an annotation driven way to tell the repository which template to use?
  If not, what else could be done to solve the problem?</p>