クラス 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
ネストされたクラスのサマリー
ネストされたクラスコンストラクターのサマリー
コンストラクター修飾子コンストラクター説明protected
protected コンストラクター。方法の概要
修飾子と型メソッド説明protected final MultiValueMap<StringSE,
StringSE> protected PrintingResultHandler.ResultValuePrinter
結果値プリンターを返します。protected final HttpHeaders
getRequestHeaders
(MockHttpServletRequest request) protected final HttpHeaders
getResponseHeaders
(MockHttpServletResponse response) final void
MvcResult
の詳細を出力します。protected void
printAsyncResult
(MvcResult result) protected void
printFlashMap
(FlashMap flashMap) 「出力」フラッシュ属性を出力します。protected void
printHandler
(ObjectSE handler, HandlerInterceptor[] interceptors) ハンドラーを出力します。protected void
ModelAndView を出力します。protected void
printRequest
(MockHttpServletRequest request) リクエストを出力します。protected void
printResolvedException
(ExceptionSE resolvedException) HandlerExceptionResolver によって解決された例外を出力します。protected void
printResponse
(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