I have to make a web service call and send many attributes while calling. One of the attribute is birthDate which is of type java.util.Date. I want birthDate to have value of this form "1960-10-25T00:00:00".
@GetMapping("/someSearch")
public PolicySearchResponseResource searchSomething(@RequestParam String firstName,
@RequestParam String lastName, @RequestParam Date birthDate) {
//call web service here and send birthDate in this form 1960-10-25T00:00:00...
}
When I send 1960-10-25T00:00:00 in request param, it is not recieving it and throwing error. Only this form "Oct 25 1960" is accepted. How to handle this?