接口的使用
org.springframework.test.web.servlet.setup.MockMvcConfigurer
使用MockMvcConfigurer的程序包 程序包 说明 org.springframework.test.web.servlet.htmlunit Server-side support for testing Spring MVC applications withMockMvcand HtmlUnit.org.springframework.test.web.servlet.htmlunit.webdriver Server-side support for testing Spring MVC applications withMockMvcand the SeleniumHtmlUnitDriver.org.springframework.test.web.servlet.setup Contains built-inMockMvcBuilderimplementations.org.springframework.test.web.servlet.htmlunit中MockMvcConfigurer的使用
参数类型为MockMvcConfigurer的org.springframework.test.web.servlet.htmlunit中的方法 修饰符和类型 方法 说明 static MockMvcWebClientBuilderMockMvcWebClientBuilder. webAppContextSetup(WebApplicationContext context, MockMvcConfigurer configurer)Create a newMockMvcWebClientBuilderbased on the suppliedWebApplicationContextandMockMvcConfigurer.参数类型为MockMvcConfigurer的org.springframework.test.web.servlet.htmlunit中的构造器 构造器 说明 MockMvcWebClientBuilder(WebApplicationContext context, MockMvcConfigurer configurer)MockMvcWebConnectionBuilderSupport(WebApplicationContext context, MockMvcConfigurer configurer)Create a new instance using the suppliedWebApplicationContextandMockMvcConfigurer.org.springframework.test.web.servlet.htmlunit.webdriver中MockMvcConfigurer的使用
参数类型为MockMvcConfigurer的org.springframework.test.web.servlet.htmlunit.webdriver中的方法 修饰符和类型 方法 说明 static MockMvcHtmlUnitDriverBuilderMockMvcHtmlUnitDriverBuilder. webAppContextSetup(WebApplicationContext context, MockMvcConfigurer configurer)Create a newMockMvcHtmlUnitDriverBuilderbased on the suppliedWebApplicationContextandMockMvcConfigurer.参数类型为MockMvcConfigurer的org.springframework.test.web.servlet.htmlunit.webdriver中的构造器 构造器 说明 MockMvcHtmlUnitDriverBuilder(WebApplicationContext context, MockMvcConfigurer configurer)org.springframework.test.web.servlet.setup中MockMvcConfigurer的使用
实现MockMvcConfigurer的org.springframework.test.web.servlet.setup中的类 修饰符和类型 类 说明 classMockMvcConfigurerAdapterAn empty method implementation ofMockMvcConfigurer.classSharedHttpSessionConfigurerMockMvcConfigurerthat stores and re-uses the HTTP session across multiple requests performed through the sameMockMvcinstance.参数类型为MockMvcConfigurer的org.springframework.test.web.servlet.setup中的方法 修饰符和类型 方法 说明 <T extends B>
TAbstractMockMvcBuilder. apply(MockMvcConfigurer configurer)<T extends B>
TConfigurableMockMvcBuilder. apply(MockMvcConfigurer configurer)Add aMockMvcConfigurerthat automates MockMvc setup and configures it for some specific purpose (e.g. security).