Request to the endpoint fails with the following error:
400 Bad request org.springframework.http.converter.HttpMessageNotReadableException: Requir
@RequestBody annotation binds the content sent in (POST / PUT) request body with the annotated variable. Since there is no 'body' part in GET request, spring throws HttpMessageNotReadableException to indicate the same.
As a general rule, you can only use @RequestBody for the requests which can have 'body' content e.g. POST or PUT.