一.SpringMVC 使用 ModelAndView 来处理返回值问题. 1.ModelAndView 官方描述: Holder for both Model and View in the web MVC framework.Note that these are entirely distinct. This class merely holdsboth to make it possible for a controller to return both modeland view in
之前两篇博客springMVC源码分析--HandlerMethodReturnValueHandler返回值解析器(一)和springMVC源码分析--HandlerMethodReturnValueHandlerComposite返回值解析器集合(二)我们分别介绍了返回值处理器相关的东西,接下来我们选取一个简单的实现类ViewNameMethodReturnValueHandler来简单介绍一下返回值处理操作. 1.返回值为jsp页面地址 @RequestMapping(value = "i