title: Spring predicate multiple operators
body: <p>I'm trying to make sortable/pageable/filterable repository with multiple filter methods. This is how my relevant code looks right now:</p>
  
  <pre><code>@Entity
  @Table(name = "user")
  public class User {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;
  
  @Column(name = "name", length = 50, nullable = false)
  private String name;
  </code></pre>
  
  <p>The repository:</p>
  
  <pre><code>@Repository
  public interface UserRepository extends JpaRepository&lt;User, Long&gt; , 
  QuerydslPredicateExecutor&lt;User&gt; {
  }
  </code></pre>
  
  <p>And the controller:</p>
  
  <pre><code>@RequestMapping(path="/test")
  public @ResponseBody ResponseEntity&lt;Object&gt; foo
  ( @QuerydslPredicate(root = User.class) Predicate predicate, Pageable pageable) {
      return userRepository.findAll(predicate,pageable);
  }
  </code></pre>
  
  <p>It is working perfectly fine, like this:
   /users/?page=0&amp;limit=1&amp;sort=name,ASC&amp;name=testuser
  But i can't use any other filter method except equals like "name=testuser"
  I was searching around and i keep finding guides like <a href="https://www.baeldung.com/rest-api-search-language-spring-data-querydsl" rel="nofollow noreferrer">this</a> but i'd have to write a PathBuilder for every entity and the controller looks way uglier too.</p>
  
  <p>Is there a way to work around this and keep everything simplified like now? I need the basic operators like eq,neq,gte,lte,like, etc...</p>