spring mvc 必须传某个参数的写法
时间:2015-05-19 12:15:21
收藏:0
阅读:121
在controller中写 @RequestMapping(中的params="json")
@RequestMapping(value = "/{username}", params = "json") @ResponseBody public User showJson(@PathVariable String username, Model model) { return users.get(username); }
评论(0)