title: Spring generates two beans of the same instance "MyRepository"
body: <p>i'm fairly 'new' to Spring Boot and need a bit of help with CrudRepositories.</p>
  <p>My problem is the following: When I want to start my Spring Boot Application, it starts just fine, creates all the tables in the database, but somehow manages to fail, because Spring creates two beans of the same interface:</p>
  <p>Note that my package hierarchy looks a bit different. Spring Boot however is referencing the exact same interface, twice.</p>
  <pre><code>The bean 'IMyRepository', defined in com.package.IMyRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration, could not be registered. A bean with that name has already been defined in com.package.IMyRepository defined in @EnableJdbcRepositories declared on JdbcRepositoriesRegistrar.EnableJdbcRepositoriesConfiguration and overriding is disabled.
  </code></pre>
  <p>For clarification: <em>I do not have two interfaces declared wit the same name</em>, <em>I do not have any MyRepositoryImpl classes</em>, <em>and I do not have multiple projects with the same hierarchy.</em> (only one: src/main/.../com.(...).IMyRepository)</p>
  <p>My Repository interface looks like this:</p>
  <pre><code>package com.package.api.components.account.repository;
  
  import com.package.api.components.account.entity.Account;
  import org.springframework.data.repository.CrudRepository;
  import org.springframework.stereotype.Repository;
  
  @Repository
  public interface IMyRepository extends CrudRepository&lt;Account, Long&gt; {
  
      Account findByEmail(String email);
  
      Account findByEmailAndPassword(String email, String password);
  }
  </code></pre>
  <p>And the only <em>single</em> time where, I am taking usage of IMyRepository is in this class:</p>
  <pre><code>@Component
  @AllArgsConstructor
  public class AccountService implements IAccountService, IRegisterService, ILoginService {
  
      private final IAccountRepository accountRepository;
  
      private final IPasswordValidationService passwordValidationService;
      private final AAccountMapper accountMapper;
  
      // Code
  }
  </code></pre>
  <p>Here are some answers on StackOverflow &amp; co I've already tried, which none off them worked for me:</p>
  <ul>
  <li><a href="https://coderanch.com/t/747155/java/bean-defined-myRepository" rel="nofollow noreferrer">https://coderanch.com/t/747155/java/bean-defined-myRepository</a></li>
  <li><a href="https://stackoverflow.com/questions/41123195/spring-boot-detects-2-identical-repository-beans">Spring Boot detects 2 identical repository beans</a></li>
  </ul>
  <p>Thanks you very much for reading this!</p>