I'm looking for a way to use multiple path parameters as one string.
The following mapping is quite clear: it defines 3 static parameters as path variables:
@RequestMapping(value = "/rest/{language}/{country}/{term}?someparams=test&...", method = RequestMethod.GET)
But I want to have anything between /rest and {term} to be written into one single @PathVariable`.
Example: I could call localhost:8080/rest/this/is/my/dynamic/customterm?someparams)...
Here I'd like to get /this/is/my/dynamic as one single path variable.
The following does not work:
@RequestMapping(value = "/rest/{multiplePathParams}/{term}someparams=test&...", method = RequestMethod.GET)
public void test(@PathVariable String multiplePathParams, @PathVariableString term) {
Assert.assertEquals(multiplePathParams, "/this/is/my/dynamic");
Assert.assertEquals(term, "customterm");
}
Is it possible at all?