摘要:
@ResponseBody @RequestMapping(value="/ip", method=RequestMethod.GET) public String getIP(HttpServletRequest request, HttpServletResponse res... 阅读全文
posted @ 2015-03-06 17:31
猿类的进化史
阅读(381)
评论(0)
推荐(0)
摘要:
@RequestMapping(method=RequestMethod.GET) public ModelAndView allUsers(@RequestParam int page){ ModelAndView mav = new ModelAndView(); ... 阅读全文
posted @ 2015-03-06 17:26
猿类的进化史
阅读(4859)
评论(0)
推荐(0)
摘要:
@RequestMapping(value="/del/{id}") public String delUser(@PathVariable int id){ return "redirect:/user"; }直接返回redirect:/user,就可以返回到user页面... 阅读全文
posted @ 2015-03-06 16:50
猿类的进化史
阅读(221)
评论(0)
推荐(0)
摘要:
1、在lib中加入jackson.jar包2、在请求函数上进行标注返回类型,ResponseBody也可以放上边 @RequestMapping(value="/json",method=RequestMethod.GET, produces="application/json;charset... 阅读全文
posted @ 2015-03-06 16:42
猿类的进化史
阅读(179)
评论(0)
推荐(0)
摘要:
@RequestMapping(value="/{id}/{name}", method=RequestMethod.GET) public ModelAndView getUrlVariable(@PathVariable int id, @PathVariable String name)... 阅读全文
posted @ 2015-03-06 16:30
猿类的进化史
阅读(1271)
评论(0)
推荐(0)
摘要:
1、自动注入Model参数,对model变量添加属性。@Controller@RequestMapping("user")public class UserController { @RequestMapping(method=RequestMethod.GET) public ... 阅读全文
posted @ 2015-03-06 16:09
猿类的进化史
阅读(1694)
评论(0)
推荐(0)
浙公网安备 33010602011771号