title: Why EntityScan , EnableJpaRepositories annotations required if we are already using componentScan annotation?
body: <p>I am already using <code>componentScan</code> annotation in main class of spring boot app , but If I use only this annotation it will gives issue while getting repositories reference. So to overcome this I am using <code>EntityScan</code> and <code>EnableJpaRepositories</code> annotations with <code>componentScan</code>.</p>
  <pre><code>@EntityScan(basePackages={&quot;com.gonkar.fleetms.models&quot;})
  @EnableJpaRepositories(basePackages={&quot;com.gonkar.fleetms.repositories&quot;})
  </code></pre>
  <p>So my question is why its required to use other two annotations? if I am already using componentScan.</p>