Emerson Farrugia opened SPR-11879 and commented
I need to support a URI which looks like
/user/5/foo;a=1;b=2
where "foo" is a literal string. Since MVC only allows matrix variables on path variables, the corresponding request mapping looks like
/user/{userId}/{foo}
Since that would allow the foo variable to be anything, I restricted it using a regular expression, and the mapping became
/user/{userId}/{foo:foo}
At which point, my matrix variables stopped working. I've attached a Gist showing how matrix variables don't work when the path variable has a regex restriction. In that Gist, /withoutRegex/3 works with both matrix variables and without matrix variables. /withRegex/3 works without matrix variables, but when I specify matrix variables, I get the error
No mapping found for HTTP request with URI [/withRegex/3;q=10] in DispatcherServlet with name 'dispatcherServlet'
Affects: 4.0.5
Reference URL: https://gist.github.com/emersonf/d656611d174e32a3d9d3
Issue Links:
Emerson Farrugia opened SPR-11879 and commented
I need to support a URI which looks like
/user/5/foo;a=1;b=2where "foo" is a literal string. Since MVC only allows matrix variables on path variables, the corresponding request mapping looks like
/user/{userId}/{foo}Since that would allow the foo variable to be anything, I restricted it using a regular expression, and the mapping became
/user/{userId}/{foo:foo}At which point, my matrix variables stopped working. I've attached a Gist showing how matrix variables don't work when the path variable has a regex restriction. In that Gist,
/withoutRegex/3works with both matrix variables and without matrix variables./withRegex/3works without matrix variables, but when I specify matrix variables, I get the errorAffects: 4.0.5
Reference URL: https://gist.github.com/emersonf/d656611d174e32a3d9d3
Issue Links:
@PathVariable&@MatrixVariabledo not work as documented when "=" is in the path variable value part (pre ";")