title: Creating a repository instance in Spring Data
body: <p>I'm new to Spring Data and to Spring in general, so don't be hard on me.</p>
  
  <p>I can't find a way to instantiate a repository. I read the documentation:</p>
  
  <p><a href="http://docs.spring.io/spring-data/data-solr/docs/1.0.0.RC1/reference/htmlsingle/#repositories.create-instances" rel="nofollow">http://docs.spring.io/spring-data/data-solr/docs/1.0.0.RC1/reference/htmlsingle/#repositories.create-instances</a></p>
  
  <p>It describes different ways of declaring repositories (xml, filters, etc), but doesn't say how I can get an instance of it in my code.</p>
  
  <p>Here is my configuration xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:solr="http://www.springframework.org/schema/data/solr"
         xsi:schemaLocation="http://www.springframework.org/schema/data/solr http://www.springframework.org/schema/data/solr/spring-solr-1.0.xsd
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"&gt;
  
      &lt;solr:repositories base-package="spring" /&gt;
      &lt;solr:solr-server id="solrServer" url="http://localhost:8983/solr" /&gt;
  
      &lt;bean id="taskRepo" class="spring.SolrTaskRepository"&gt;
      &lt;/bean&gt;
  
      &lt;bean id="solrTemplate" class="org.springframework.data.solr.core.SolrTemplate"&gt;
          &lt;constructor-arg index="0" ref="solrServer"/&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>And SolrTaskRepository:</p>
  
  <pre><code>public interface SolrTaskRepository&lt;T, ID extends Serializable&gt; extends SolrCrudRepository&lt;T, ID&gt; {
      Page&lt;T&gt; findByOrigin(String origin, Pageable page);
  }
  </code></pre>
  
  <p>Could someone help me out?</p>