Spring - Advanced comparator for QueryDsl support
<p>Following the <a href="http://docs.spring.io/spring-data/commons/docs/current/reference/html/#core.web.type-safe" rel="noreferrer">official documentation</a>, adding <code>@EnableSpringDataWebSupport</code> annotation to my Spring configuration allows to automatically inject a <code>Predicate</code> class in query:</p>
<pre><code>@RequestMapping(method = RequestMethod.GET, path=&quot;/find&quot;)
public ResponseEntity&lt;PagedResources&lt;FooResource&gt;&gt; find(Pageable pageable, PagedResourcesAssembler&lt;Foo&gt; assembler, @QuerydslPredicate(root = Foo.class) Predicate predicate) {
    Page&lt;Foo&gt; foos = fooRepository.findAll(predicate, pageable)
    final ResourceAssemblerSupport&lt;Foo, FooResource&gt; fooResourceAssembler = new ....;
    final PagedResources&lt;FooResource&gt; pagedResources = assembler.toResource(foos, fooResourceAssembler);
    return new ResponseEntity&lt;&gt;(pagedResources, HttpStatus.OK);
}
</code></pre>
<p>Then I can easily search when performing the GET request:</p>
<pre><code>GET /foo/name?=bob&amp;name=alice&amp;age=20
</code></pre>
<p>This works fine. However I was wondering how to achieve more advanced search criteria:</p>
<ul>
<li><code>&gt;</code></li>
<li><code>&lt;</code></li>
<li><code>&gt;=</code></li>
<li><code>&lt;=</code></li>
</ul>
<p>Typically I would like to apply these operators to numeric and date fields in my data models. These sorts of criterion are supported in Querydsl.</p>
<p>I tried adding <code>&gt; (%3E)</code> in my query parameters but it fails parsing (for example for numeric field like age it complains it cannot parse <code>&gt;10</code> as a number.</p>
<p>Is it possible to use this operator directly in the query?</p>
<p>(In case it matters I'm using Spring Data Mongodb)</p>