Fix issue with extracting matrix variables
The servlet spec recommends removing path parameters from the contextPath, servletPath, and pathInfo but not from the requestURI. This poses a challenge for the UrlPathHelper, which determines the lookup path by comparing the above. This change introduces a method that matches the requestURI to the contextPath and servletPath ignoring path parameters (i.e. matrix variables) for comparison purposes while also preserving them in the resulting lookup path.
This commit is contained in:
@@ -116,7 +116,7 @@ public class MatrixVariableMethodArgumentResolver extends AbstractNamedValueMeth
|
||||
protected void handleMissingValue(String name, MethodParameter param) throws ServletRequestBindingException {
|
||||
String paramType = param.getParameterType().getName();
|
||||
throw new ServletRequestBindingException(
|
||||
"Missing URI path parameter '" + name + "' for method parameter type [" + paramType + "]");
|
||||
"Missing matrix variable '" + name + "' for method parameter type [" + paramType + "]");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user