title: findAll Iterable AND Pageable in Spring Data
body: <p>We can do a <code>List&lt;MyInfo&gt; findAll(List&lt;Integer&gt; ids)</code> in spring data. How do i combine this with pagination?</p>
  
  <p>On the lines of:</p>
  
  <pre><code>findAll(ids, pageRequest);
  </code></pre>
  
  <p>I tried something on the lines of creating a specification and using that, but i'm doing something wrong:</p>
  
  <pre><code>public class MySpecs {
  
      public static Specification&lt;MyInfo&gt; idsIn(final List&lt;Integer&gt; ids)
      {
  
          return new Specification&lt;MyInfo&gt;() {
  
              @Override
              public Predicate toPredicate(Root&lt;MyInfo&gt; root,
                      CriteriaQuery&lt;?&gt; query, CriteriaBuilder cb) {
                  return root.get("id").in(ids);
  
  
              }
  
          };
      }
  }
  
  
  myRepo.findAll(MySpecs.isIn(ids),pageRequest)
  </code></pre>
  
  <p>Thanks</p>