Here is my spring boot controller
@GetMapping(value = "/{id}/{fileName}")
@ResponseStatus(HttpStatus.OK)
public Response getDocument(@PathVariable Long id, @PathVariable String filename)
When a request is send with fileName="test.docx"
, the controller pathvariable value is test (missing .docx
). Is there anyway to get the parameters passed by the user?
I tried using
@GetMapping(value = "/{id}/{**fileName:.***}").
However, I got below status code 406 message on server (without even hitting the controller code path)
"exception": "org.springframework.web.HttpMediaTypeNotAcceptableException", "message": "Could not find acceptable representation",
Spring boot version 1.5.7.RELEASE