0
@RequestMapping(value = "{path:[^\\.]*}")

This regex catch only those requests which looks like: http://localhost:8091/history. How to change it into regex which will catch more specific requests like e.g. http://localhost:8091/history/blabla, http://localhost:8091/history/1 ?

Unfortunately @RequestMapping(value = "/**") doesn't work at all.

bielas
  • 672
  • 2
  • 12
  • 29
  • It looks like you want to match a parameter. Take a look on this question: https://stackoverflow.com/questions/7021084/how-do-you-receive-a-url-parameter-with-a-spring-controller-mapping – Michał Ziober Oct 23 '17 at 19:25
  • No I don’t want to match the parameter. I want to match all characters after ‘/‘ without dot at the first place – bielas Oct 23 '17 at 19:27
  • You may try: `@RequestMapping("/*/*")` – anubhava Oct 23 '17 at 19:29
  • @YCF_L - `Illegal character escaping` @anubhava - it wokrs but in only examples like `http://localhost:8091/history/3` so there are two "parameters". And what about when I'd like to provide one,three or infinity this paremeters? – bielas Oct 23 '17 at 19:34
  • It also doesn’t work. I have tried this already – bielas Oct 23 '17 at 19:37
  • I know but after your response I also tried that one solution – bielas Oct 23 '17 at 19:39
  • Nope..nothing happens – bielas Oct 23 '17 at 19:42

0 Answers0