I am already using componentScan 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 EntityScan and EnableJpaRepositories annotations with componentScan.
@EntityScan(basePackages={"com.gonkar.fleetms.models"})
@EnableJpaRepositories(basePackages={"com.gonkar.fleetms.repositories"})
So my question is why its required to use other two annotations? if I am already using componentScan.