Spring WebFlux doesn't allow a path parameter with a character that is not a valid identifier character. For example in traditional MVC you can do: ``` @RequestMapping("/number-details/{mobile-number}") public String numberDetails(@PathVariable(name = "mobile-number") String number) { return "Number: " + number; }
But in webflux stack this throws an exception.
org.springframework.web.util.pattern.PatternParseException: Char '-' is not allowed in a captured variable name at org.springframework.web.util.pattern.InternalPathPatternParser.parse(InternalPathPatternParser.java:178) at org.springframework.web.util.pattern.PathPatternParser.parse(PathPatternParser.java:100) ```
Comment From: rstoyanchev
The range of characters for a Java identifier seems a reasonable fit for pattern variables, so I've kept the Character.isJavaIdentifierPart check in place, while also explicitly allowing "-". Hopefully this takes care of the issue.
Comment From: chrispetermu
i face same problem today, how to solve that bro
Comment From: bclozel
@chrispetermu it's been fixed for years now. If you believe you've found a bug, please create a new issue and with a sample project (something we can download/git clone and run) reproducing the issue. Thanks!