SpringMVC 对请求参数的设置

来源:互联网 发布:苏州淘宝装修外包 编辑:程序博客网 时间:2024/06/07 00:36
    1.  @RequestMapping("/hello") 可以写成一个数组。 内部实现方法已被重载。@Controller@RequestMapping("/test")public class MyController {     @RequestMapping("/some.do")     public ModelAndView doSome(HttpServletRequest request,HttpServletResponse response)throws Exception {           return new ModelAndView("some");     }     @RequestMapping("/other.do")     public ModelAndView doOther(HttpServletRequest request,HttpServletResponse response) throws Exception {           return new ModelAndView("other");     }}

此时访问的路径是:
http://localhost:8080/SpringMVC/test/some.do。。

2.上图:

这里写图片描述

原创粉丝点击