Issue
I have a problem that I cannot solve. I try to figure out the matrix variables in Spring MVC. Matrix variable has been enabled. Here is my project structure:
I inspect a handler function in ProductController :
// added in page 102
@RequestMapping("/products/filter/{params}/{specification}")
public String filter(@MatrixVariable(pathVar = "params") Map<String, List<String>> criteriaFilter,
@MatrixVariable(pathVar = " specification") Map<String, List<String>> specFilter, Model model) {
System.out.println("inside filter function.");
return "products";
}
when I call the url:
http://localhost:8080/springmvc197/products/filter/params;brands=Google,Dell;categories=Tablet,Laptop/specification;dimension=10,20,15;color=red,green,blue
criteriaFilter is filled with categories and brand variable, as it was supposed to, but specification is not filled. What could be the problem?
Thanks in advance.
Solution
As R.G pointed out, when I try it without space, it works.
Answered By - tahasozgen