title: Advantages to use JPA @Query
body: <p>I was checking some code and noticed some developer creating adding method for simple queries in JPA repositories.
  Any idea if there is an advantage to do it like this ?</p>
  <pre><code>@Query(value = &quot;select d from Book b where b.author= ?1&quot;)
  Collection&lt;Book&gt; getBookAuthor(final String author);
  </code></pre>