title: spring boot fancy filtering for rest based on fields values
body: <p>I'm working on a Spring boot application that exposes some endpoints. What I want to achieve is to provide a fancy filtering mechanism based on fields values. Let's say I have two domain models: Article and Author, where an article can be written by a list of Authors.</p>
  
  <pre><code>@Entity
  public class Article{
      @Id
      private String id;
      private String title;
      private String body;
      @OneToMany
      private List&lt;Author&gt; authors;
  
      //Getters and setters
  }
  
  @Entity
  public class Author{
  
      @Id
      private String id;
      private String firstname;
      private String lastname;
  
      //Getter and setters
  }
  </code></pre>
  
  <p>For now, I can access all my articles using the endpoint: <strong><em>localhost:8080/api/articles</em></strong>, and with the new filtering system that I want to integrate, I would like to have something like: <strong><em>localhost:8080/api/articles?title=myTitle</em></strong> to retrieve articles by title, or <strong><em>localhost:8080/api/articles?title=mytitle&amp;author.firstname=Jhon</em></strong> to retrieve articles by titles and author's firstname.</p>
  
  <p>I looked into JPA specifications and succeeded to make a first filtering on the direct fields of my models, but I can't make it work for nested fields, or enumeration types. Any library or other solution to achieve such need?</p>