接口的使用
org.springframework.test.web.servlet.ResultHandler
使用ResultHandler的程序包 程序包 说明 org.springframework.test.web.servlet Contains server-side support for testing Spring MVC applications.org.springframework.test.web.servlet.result Contains built-inResultMatcherandResultHandlerimplementations.org.springframework.test.web.servlet.setup Contains built-inMockMvcBuilderimplementations.org.springframework.test.web.servlet中ResultHandler的使用
参数类型为ResultHandler的org.springframework.test.web.servlet中的方法 修饰符和类型 方法 说明 ResultActionsResultActions. andDo(ResultHandler handler)Perform a general action.org.springframework.test.web.servlet.result中ResultHandler的使用
实现ResultHandler的org.springframework.test.web.servlet.result中的类 修饰符和类型 类 说明 classPrintingResultHandlerResult handler that printsMvcResultdetails to a given output stream — for example:System.out,System.err, a customjava.io.PrintWriter, etc.返回ResultHandler的org.springframework.test.web.servlet.result中的方法 修饰符和类型 方法 说明 static ResultHandlerMockMvcResultHandlers. log()LogMvcResultdetails as aDEBUGlog message via Apache Commons Logging using the log categoryorg.springframework.test.web.servlet.result.static ResultHandlerMockMvcResultHandlers. print()PrintMvcResultdetails to the "standard" output stream.static ResultHandlerMockMvcResultHandlers. print(OutputStream stream)PrintMvcResultdetails to the suppliedOutputStream.static ResultHandlerMockMvcResultHandlers. print(Writer writer)org.springframework.test.web.servlet.setup中ResultHandler的使用
参数类型为ResultHandler的org.springframework.test.web.servlet.setup中的方法 修饰符和类型 方法 说明 <T extends B>
TAbstractMockMvcBuilder. alwaysDo(ResultHandler resultHandler)<T extends B>
TConfigurableMockMvcBuilder. alwaysDo(ResultHandler resultHandler)Define a global action that should always be applied to every response.