title: Can I combine a @Query definition with a Specification in a Spring Data JPA repository method?
body: <p>Is it possible to use both <code>@Query</code> annotation and specification in one repository method? For example I'd like to have a method like this:</p>
  
  <pre><code>@Query(value="SELECT e from EMPLOYEE where firstName &lt;&gt; ?1")
  public Page&lt;Employee&gt; findEmployeeBySomethigFancy(String firstName, Pageable pageable, Specification&lt;Employee&gt; emp);
  </code></pre>
  
  <p>Is it possible or should I build the whole query as a <code>Predicate</code> and remove the <code>@Query</code> annotation?</p>