找不到这个不幸的答案,所以希望有人可以帮忙。Spring MVC中的多个@PathVariable
在Spring MVC 3.1.0这里是我的方法:
@RequestMapping(value = "/{app}/conf/{fnm}", method=RequestMethod.GET)
public ResponseEntity<?> getConf(@PathVariable String app, @PathVariable String fnm) {
log.debug("AppName:" + app);
log.debug("fName:" + fnm);
...
return ...
}
我已经看到了一些在线的例子,它似乎存在具有理论上多个@PathVariables没有问题。
但是,当我这样做时,“app”和“fnm”都包含相同的值(即分配给“app”的值)。
真的很感谢任何见解有人可能要我去哪里错了吗?
谢谢!
应该工作,你确定你调用它是正确的? – NimChimpsky 2012-07-05 19:17:19