1. 返回ModelAndView

2.  返回void

<1>  request

SpringMVC的Controller方法返回值的3种类型

新建msg.jsp

SpringMVC的Controller方法返回值的3种类型

<2> response

SpringMVC的Controller方法返回值的3种类型

 

 

3. 返回String

  

<1>返回视图名字(响应视图)

<2>  redirect与forward

请求转发(可以带上request请求参数)与  重定向

SpringMVC的Controller方法返回值的3种类型

 

相关文章:

  • 2021-09-21
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
  • 2021-06-13
猜你喜欢
  • 2021-07-30
  • 2021-07-14
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2021-10-30
  • 2021-05-24
相关资源
相似解决方案