title: Spring Boot w/ JPA: move @Entity to different package
body: <p>I'm having trouble with my first steps using Spring-Boot with JPA. I've started with a pretty minimalistic <a href="https://github.com/spring-guides/gs-accessing-data-jpa.git">example from Git</a> using Gradle. </p>
  
  <p>Now simply moving <code>Customer</code> to another package, let's say to <code>hello2</code> results in an exception <code>Caused by: java.lang.IllegalArgumentException: Not an managed type: class hello2.Customer</code>. I tried to add </p>
  
  <p><code>@ComponentScan(basePackageClasses= {Customer.class}) // AND OR
  @EnableJpaRepositories(basePackageClasses= {Customer.class})</code></p>
  
  <p>to <code>Application</code>, but without success. </p>
  
  <p>What am I doing wrong?</p>