This Issue occurs when the main class and repository class are in different packages and the repository class and interfaces are not automatically scanned. The solution is to annotate the main class with EnableJpaRepositories and explicitly mention the repository package that needs to be scanned.