org.springframework.web.servlet.mvc.support.RedirectAttributes to specify the exact set of attributes to use in case of a redirect and also to add flash attributes (attributes stored temporarily on the server-side to make them available to the request after the redirect). See ...
这些对象在测试web context,controllers 和 filters 的时候很有用。由于这些 mock 对象是有针对性地为了与 Spring 的 Web MVC 框架共同使用而编写的,因此相比起诸如 EasyMock 这种动态mock 对象或 MockObjects 这种替代性的 Servlet API mock 对象,使用起来要更为方便。 + +## 10.2 单元测试支持类 + +#...
The<mvc:annotation-driven>tag will automatically register these two classes with spring MVC. This adapter was deprecated in Spring 3.2 and a new handler adapter calledRequestMappingHandlerAdapterwas introduced in Spring 3.1. 4.4.RequestMappingHandlerAdapter This adapter class was introduced in Spring 3.1,...