I have a Spring Roo mvc project going with a model called WorkOrder. I used the Roo shell to generate two finders for this model: findWorkOrdersByDateCompletedEquals and findWorkOrdersByDateCompletedBetween.
Problem: when I search using the findWorkOrdersByDateCompletedBetween, the minDateCompleted and maxDateCompleted parameters in the url are in the wrong format (the S- format)
.../workorders?find=ByDateCompletedBetween&minDateCompleted=2012-05-08&maxDateCompleted=2012-05-31
Here is the error from the debug log:
Failed to convert from type java.lang.String to type
@org.springframework.web.bind.annotation.RequestParam
@org.springframework.format.annotation.DateTimeFormat java.util.Date for value '2012-05-15';
The funny thing is that the findWorkOrdersByDateCompletedEquals works just fine, and generates a url like this:
.../workorders?find=ByDateCompletedEquals&dateCompleted=May+30%2C+2012
What determines how these URLs get generated? The code is virtually identical between the two finders, why would they generate dates in different formats?