クラス PrintingResultHandler
java.lang.ObjectSE
org.springframework.test.web.servlet.result.PrintingResultHandler
- 実装されているすべてのインターフェース:
ResultHandler
MvcResult の詳細を特定の出力ストリームに出力する結果ハンドラー - 例: System.out、System.err、カスタム java.io.PrintWriter など。 このクラスのインスタンスは、通常、MockMvcResultHandlers の print または log メソッドのいずれかを介してアクセスされます。
- 導入:
- 3.2
- 作成者:
- Rossen Stoyanchev, Sam Brannen
ネストされたクラスの要約
ネストされたクラスコンストラクターの概要
コンストラクター修飾子コンストラクター説明protectedprotected コンストラクター。メソッドのサマリー
修飾子と型メソッド説明protected final MultiValueMap<StringSE,StringSE> protected PrintingResultHandler.ResultValuePrinter結果値プリンターを返します。protected final HttpHeadersgetRequestHeaders(MockHttpServletRequest request) protected final HttpHeadersgetResponseHeaders(MockHttpServletResponse response) final voidMvcResultの詳細を出力します。protected voidprintAsyncResult(MvcResult result) protected voidprintFlashMap(FlashMap flashMap) 「出力」フラッシュ属性を出力します。protected voidprintHandler(ObjectSE handler, HandlerInterceptor[] interceptors) ハンドラーを出力します。protected voidModelAndView を出力します。protected voidprintRequest(MockHttpServletRequest request) リクエストを出力します。protected voidprintResolvedException(ExceptionSE resolvedException) HandlerExceptionResolver によって解決された例外を出力します。protected voidprintResponse(MockHttpServletResponse response) レスポンスを出力します。
コンストラクターの詳細
PrintingResultHandler
protected コンストラクター。- パラメーター:
printer- 実際の書き込みを行うPrintingResultHandler.ResultValuePrinter
メソッドの詳細
getPrinter
結果値プリンターを返します。- 戻り値:
- プリンター
handle
MvcResultの詳細を出力します。- 次で指定:
- インターフェース
ResultHandlerのhandle - パラメーター:
result- 実行されたリクエストの結果- 例外:
ExceptionSE- 障害が発生した場合
printRequest
リクエストを出力します。- 例外:
ExceptionSE
getRequestHeaders
getParamsMultiValueMap
protected final MultiValueMap<StringSE,StringSE> getParamsMultiValueMap(MockHttpServletRequest request) getSessionAttributes
printAsyncResult
- 例外:
ExceptionSE
printHandler
protected void printHandler(@Nullable ObjectSE handler, @Nullable HandlerInterceptor[] interceptors) throws ExceptionSE ハンドラーを出力します。- 例外:
ExceptionSE
printResolvedException
HandlerExceptionResolver によって解決された例外を出力します。- 例外:
ExceptionSE
printModelAndView
ModelAndView を出力します。- 例外:
ExceptionSE
printFlashMap
「出力」フラッシュ属性を出力します。- 例外:
ExceptionSE
printResponse
レスポンスを出力します。- 例外:
ExceptionSE
getResponseHeaders