你的位置:首页 > 软件开发 > Java > @RequestMapping

@RequestMapping

发布时间:2016-05-27 07:00:13
1.web.配置:123456789101112131415<span style="font-size: 15px;"><servlet> <servlet-name>dispatcher</s ...

1.web.配置:

1
 1 <?@RequestMapping

 

2.spring mvc处理方法支持如下的返回方式:ModelAndView, Model, ModelMap, Map,View, String, void

 

ModelAndView

 

  1.    
  2. @RequestMapping("/show1") 
  3. public ModelAndView show1(HttpServletRequest request, 
  4.            HttpServletResponse response) throws Exception { 
  5.        ModelAndView mav = new ModelAndView("/demo2/show"); 
  6.        mav.addObject("account", "account -1"); 
  7.        return mav; 
  8.    } 

原标题:@RequestMapping

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录