I have the following @RestController
method in Spring Boot 1.5.9:
@GetMapping(value = "/today/{timeZoneId}", produces = MediaType.APPLICATION_JSON_VALUE)
public Instant getToday(@PathVariable("timeZoneId") String timeZoneId) {
return getNextPublishingDateTime(Instant.now(), timeZoneId);
}
When I GET
with /today/Europe/Paris
, I have a 404
error.
I tried to GET
with /today/Europe%2FParis
but also got a 404
.
This is due to the slash in the timeZoneId
.
How can I use @PathVariable
for my timeZoneId
in Spring ?