title: Spring Boot CrudRepository or JpaRepository - how to pass limit as argument?
body: <p>I have repository interface which extends <code>CrudRepository</code>:</p>
  
  <pre><code>public interface ExampleRepository extends CrudRepository&lt;Example, Long&gt;{
      List&lt;Example&gt; findByValidIsTrueLimit(Integer limit);
  }
  </code></pre>
  
  <p>I want to limit list of results to a specified limit like with <code>limit</code> in SQL query.</p>
  
  <p>However I get:</p>
  
  <blockquote>
    <p>Caused by: org.springframework.beans.factory.BeanCreationException:
    Error creating bean with name 'exampleRepository': Invocation of init
    method failed; nested exception is java.lang.IllegalArgumentException:
    Failed to create query method public abstract No property limit found
    for type</p>
  </blockquote>
  
  <p>How to add limit passed as argument to <code>CrudRepository</code> method?</p>