title: Spring : Parameter with that position did not exist exception
body: <p>I am using Spring framework and in the following repository currentOrder method I send dates as a parameter but when I do this <code>Parameter with that position [1] did not exist</code> exception thrown 
  I am sending following URL 
  <code>http://localhost:3000/api/orders/search/currentOrder?fromDate=2017-04-28&amp;toDate=2017-05-02</code></p>
  
  <p>Where is the mistake in my code?</p>
  
  <pre><code>public interface OrderRepository extends JpaRepository&lt;Order, Long&gt; {
       @PreAuthorize("hasAuthority('rights')")
       @Query("Select o.orderDate from Order o where o.orderDate between fromDate and toDate")
       List&lt;Order&gt; currentOrder(@Param("fromDate") Date fromDate,@Param("toDate") Date toDate);
  }
  </code></pre>