Is it possible to implement in a spring such that I suppose I contact url localhost:8080/myproject/request/123/123/123/123.txt and then pull out this string in string after the word request? /123/123/123/123.txt
1 answer
@RequestMapping("/request/{path:.*}") public void handle(@PathVariable String path) { ... } - And the
pathwill just have the desired string. - DimXenon - As it did not work, after the first oncoming slash it no longer reads and says that the page was not found - Kleimosc
- oneStrange, it should work. Well, then it remains only to use
@RequestMapping("/request/**"), and in the handler to disassemble whatgetRequestURIreturns. - Sergey Gornostaev - Well, about it helped - Kleimosc
|