【发布时间】:2014-05-03 21:15:20
【问题描述】:
我正在使用 Spring 3.2.6 来通过一个基本示例来学习 @MatrixVariable 功能。
我已经编写了这个方法来从 URI 中获取矩阵变量:
@RequestMapping(value="/matrix/{paths}", method=RequestMethod.GET)
public ModelAndView MatrixVariableExample(@MatrixVariable Integer age){
ModelAndView mv = new ModelAndView("affichageMatrix");
mv.addObject("age", age);
return mv;
}
我使用这个 URI:localhost:8080/SpringMVC-Maven/matrix/user;age=23
age 变量的返回值为 null,但我应该是 23
【问题讨论】:
标签: java spring maven spring-mvc url-routing