2

How to intercept command as @PathVariable, given such mapping:

@RequestMapping(value = "/rest/v1/{command}", method = {GET, POST, PUT, DELETE, PATCH})

It works only for something like rest/v1/info, but not for /rest/v1/info/more-info/and-more-info - because I get 404. In that case, I would want my command variable to be equal to info/more-info/and-more-info.

Dargenn
  • 372
  • 4
  • 11
  • 1
    Possible duplicate of [How to handle requests that includes forward slashes (/)?](https://stackoverflow.com/questions/31421061/how-to-handle-requests-that-includes-forward-slashes) – sidgate May 10 '19 at 10:01
  • 1
    It does not seem to be properly designed for a REST API. You should probably use query params for additional informations on a specific command. – Darnoj May 10 '19 at 10:04

0 Answers0