I am trying to write a rest api in which I pass the date as a URL parameter.
Date formatting: dd / MM / yyyy HH: mm ; REST API URL
public static final String GET_TestDate = "/ stay / datecheck? dateCheckIn = {dateCheckIn}";
and method "Rest"
@RequestMapping(value = HotelRestURIConstants.GET_TestDate, method = RequestMethod.GET)
public @ResponseBody String getDate(@PathVariable("dateCheckIn") @DateTimeFormat(iso= DateTimeFormat.ISO.DATE) String dateCheckIn) {
logger.info("passing date as a param");
String str="date"+dateCheckIn;
return str;
}
but when I call this api using a REST client, I get a 404 error . Here is the REST URL
http://localhost:8089/stay/datecheck?dateCheckIn="28/01/2016 19:00"
source
share