类的使用
org.springframework.mock.web.MockHttpServletRequest
使用MockHttpServletRequest的程序包 程序包 说明 org.springframework.mock.web A comprehensive set of Servlet API 4.0 mock objects, targeted at usage with Spring's Web MVC framework.org.springframework.test.web.servlet Contains server-side support for testing Spring MVC applications.org.springframework.test.web.servlet.request Contains built-inRequestBuilderimplementations.org.springframework.test.web.servlet.result Contains built-inResultMatcherandResultHandlerimplementations.org.springframework.mock.web中MockHttpServletRequest的使用
org.springframework.mock.web中MockHttpServletRequest的子类 修饰符和类型 类 说明 classMockMultipartHttpServletRequestMock implementation of theMultipartHttpServletRequestinterface.org.springframework.test.web.servlet中MockHttpServletRequest的使用
返回MockHttpServletRequest的org.springframework.test.web.servlet中的方法 修饰符和类型 方法 说明 MockHttpServletRequestRequestBuilder. buildRequest(ServletContext servletContext)Build the request.MockHttpServletRequestMvcResult. getRequest()Return the performed request.MockHttpServletRequestSmartRequestBuilder. postProcessRequest(MockHttpServletRequest request)Apply request post processing.参数类型为MockHttpServletRequest的org.springframework.test.web.servlet中的方法 修饰符和类型 方法 说明 MockHttpServletRequestSmartRequestBuilder. postProcessRequest(MockHttpServletRequest request)Apply request post processing.org.springframework.test.web.servlet.request中MockHttpServletRequest的使用
返回MockHttpServletRequest的org.springframework.test.web.servlet.request中的方法 修饰符和类型 方法 说明 MockHttpServletRequestMockHttpServletRequestBuilder. buildRequest(ServletContext servletContext)Build aMockHttpServletRequest.protected MockHttpServletRequestMockHttpServletRequestBuilder. createServletRequest(ServletContext servletContext)Create a newMockHttpServletRequestbased on the suppliedServletContext.protected MockHttpServletRequestMockMultipartHttpServletRequestBuilder. createServletRequest(ServletContext servletContext)Create a newMockMultipartHttpServletRequestbased on the suppliedServletContextand theMockMultipartFilesadded to this builder.MockHttpServletRequestMockHttpServletRequestBuilder. postProcessRequest(MockHttpServletRequest request)MockHttpServletRequestRequestPostProcessor. postProcessRequest(MockHttpServletRequest request)Post-process the givenMockHttpServletRequestafter its creation and initialization through aMockHttpServletRequestBuilder.参数类型为MockHttpServletRequest的org.springframework.test.web.servlet.request中的方法 修饰符和类型 方法 说明 MockHttpServletRequestMockHttpServletRequestBuilder. postProcessRequest(MockHttpServletRequest request)MockHttpServletRequestRequestPostProcessor. postProcessRequest(MockHttpServletRequest request)Post-process the givenMockHttpServletRequestafter its creation and initialization through aMockHttpServletRequestBuilder.org.springframework.test.web.servlet.result中MockHttpServletRequest的使用
参数类型为MockHttpServletRequest的org.springframework.test.web.servlet.result中的方法 修饰符和类型 方法 说明 protected MultiValueMap<String,String>PrintingResultHandler. getParamsMultiValueMap(MockHttpServletRequest request)protected HttpHeadersPrintingResultHandler. getRequestHeaders(MockHttpServletRequest request)protected Map<String,Object>PrintingResultHandler. getSessionAttributes(MockHttpServletRequest request)protected voidPrintingResultHandler. printRequest(MockHttpServletRequest request)Print the request.