title: Why are my Spring Data repositories not found if moved into another package of a Spring Boot application?
body: <p>I created a new project in Eclipse from these helpful spring examples (Import Getting Started Content). It is called "gs-accessing-data-rest-complete"</p>
  
  <p>Reference and full Code can be found: <a href="https://github.com/spring-guides/gs-accessing-data-rest/tree/master/complete/src/main/java/hello" rel="nofollow">spring-guides/gs-accessing-data-rest</a></p>
  
  <p>When leaving the example unchanged, except using <strong>WAR</strong> instead of <strong>JAR</strong> packaging, everything works well. When calling <code>$ curl http://localhost:8080/</code>, I'll get an exposure of usable resources.</p>
  
  <pre><code>$ curl http://localhost:8080/
  {
    "_links" : {
      "people" : {
        "href" : "http://localhost:8080/name{?page,size,sort}",
        "templated" : true
      },
  "profile" : {
    "href" : "http://localhost:8080/alps"
      }
    }
  </code></pre>
  
  <p>But when moving the <code>PersonRepository</code> into another package, e.g. <code>myRepos</code> via Eclipse's Refactor-->Move command, a resource is not accessible anymore.</p>
  
  <p>The response from curl is then:</p>
  
  <pre><code>$ curl http://localhost:8080/
  {
    "_links" : {
      "profile" : {
        "href" : "http://localhost:8080/alps"
      }
    }
  }
  </code></pre>
  
  <p>As far as I understood, Spring scans for Repositories automatically. Because the main class uses <a href="http://docs.spring.io/spring-boot/docs/1.2.2.RELEASE/reference/htmlsingle/#using-boot-using-springbootapplication-annotation" rel="nofollow"><code>@SpringBootApplication</code></a> annotation, everything should be found by spring itself. </p>
  
  <p>What am I missing? Do I have to add some special XML configuration file or add another Configuration Class somewhere? Or do I have to update application.properties in order to sth.? </p>
  
  <p>Perhaps somebody has some useful experiences, she or he might share with me. Thank you.</p>