spring-mvc-error-handling-example icon indicating copy to clipboard operation
spring-mvc-error-handling-example copied to clipboard

如果 ModelAndView 是 empty,也可能会 forward 到 /error

Open huangdenghe opened this issue 5 years ago • 0 comments

关于 Spring MVC 处理请求的总体流程图中的文字说明“如果 ModelAndView 是 empty,则结束”,我测试发现并不总是这样,经由 DefaultHandlerExceptionResolver 处理返回的 empty 的 ModelAndView 会 forward 到 /error,而这与是否调用 HttpServletResponse#sendError 有关

huangdenghe avatar May 08 '19 06:05 huangdenghe