重定向

Redirect
表示重定向到一个地址

ThymeleafViewResolver
Spring MVC的视图解析器
作用,根据视图名,得到视图对象

createView
创建视图对象
viewName,方法的返回值
Spring boot重定向请求
得到视图名
进行一些判断

如果,startsWith,以redirect开始
会创建一个RedirectView,重定向视图

RedirectView

重定向视图

renderMergedOutputModel
渲染视图
Spring boot重定向请求
sendRedirect
发送重定向,底层实现

是原生的Servlet重定向
response.sendRedirect(encodedURL);
Spring boot重定向请求
如果,以forward开始
就会创建一个

相关文章:

  • 2021-10-27
  • 2021-11-23
  • 2021-10-19
  • 2022-03-06
  • 2021-10-18
  • 2021-07-10
猜你喜欢
  • 2021-04-20
  • 2021-08-25
  • 2021-07-02
  • 2021-09-11
  • 2021-08-23
  • 2021-09-18
相关资源
相似解决方案