2018-01-11

对于springMVC处理方法支持支持一系列的返回方式: 

(1)ModelAndView 
(2)Model 
(3)ModelMap 
(4)Map 
(5)View 
(6)String 
(7)Void 

 

一、ModelAndView:一个包含模型和视图的ModelAndView 对象。

@RequestMapping(method=RequestMethod.GET)
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("/user/index");
        modelAndView.addObject("xxx", "xxx");
        return modelAndView;
    }
View Code

相关文章:

  • 2021-10-31
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2021-05-28
  • 2021-07-14
  • 2021-05-18
  • 2022-12-23
猜你喜欢
  • 2021-09-21
  • 2021-08-22
  • 2021-09-29
  • 2021-08-05
相关资源
相似解决方案