title: How do custom methods in JpaRepository interface work?
body: <p>in my Spring Boot projects I use custom methods in repository which I can fold up using IntelliJ suggestions.</p>
  
  <p>Example:</p>
  
  <pre><code>@Repository
  public interface BookRepository  extends JpaRepository&lt;Book, Integer&gt;
  {
      List&lt;Book&gt; getAllByAuthor_IdAuthorAndCategory_IdCategoryOrderByTitleASC(int idAuthor, int idCategory);
  
  }
  </code></pre>
  
  <p>Where Book's model looks:</p>
  
  <pre><code>@Entity
  @Table(name = "book")
  public class Book {
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(name = "id_book")
      private int idBook;
  
      @Column(name = "title")
      private String title;
  
      @ManyToOne
      @JoinColumn(name = "id_author", referencedColumnName = "id_author")
      private Author author;
  
      @ManyToOne
      @JoinColumn(name = "id_category", referencedColumnName = "id_category")
      private Category category;
  
      public Book() {}
  
      // Setters and Getters....
  }
  </code></pre>
  
  <p>And it actually work excellent without any configuration or additional classes! It is so simple and usefull... but how does it work? I can't find any documentation or tutorial about this function in JpaRepository. I discovered it by accident. I'd appreciate for any information. Anyone?</p>