title: JPA findAll(spec,Sort)
body: <p>I have this code to get all transaction between 2 dates. I would like to get a desc sorted list. What are the possibilities?  </p>
  
  <pre><code>@Override
  public List&lt;Transaction&gt; searchBySubmitDate(final Date startDate, 
                                              final Date endDate) {
      return transactionRepository.findAll(new Specification&lt;Transaction&gt;() {
          @Override
          public Predicate toPredicate(Root&lt;Transaction&gt; transaction, 
                                       CriteriaQuery&lt;?&gt; q, CriteriaBuilder cb) {
              Predicate between = cb.between(transaction.get(Transaction_.dateSubmit), startDate, endDate);
  
              return between;
          }
      });
  </code></pre>