title: find by id in spring data jpa Base Repository
body: <p>I'm trying to implement a generic <code>findByIdsIn</code> method in the <code>BaseRepository</code> of my Spring Data JPA class so that the functionality can be used by all the classes that implement that interface.
  I'm pretty new to Spring Data JPA so I'm not sure if that is possible and how to implement it.</p>
  
  <p>Here's the code I have so far. The <code>findByIdsIn</code> is the functionality I'd like to implement. </p>
  
  <pre><code>import org.springframework.data.repository.NoRepositoryBean;
  import org.springframework.data.repository.Repository;
  
  import java.io.Serializable;
  import java.util.List;
  import java.util.Optional;
  
  @NoRepositoryBean
  public interface BaseRepository&lt;T, ID extends Serializable&gt; extends Repository&lt;T, ID&gt; {
      List&lt;T&gt; findAll( );
      Optional&lt;T&gt; findById(ID id);
      List&lt;T&gt; findByIdsIn(List&lt;ID&gt; ids); // This is the functionality I'd like to implement.
  }
  </code></pre>
  
  <p>Do you guys have any suggestions?
  Many thanks!</p>