インターフェースの使用
org.springframework.test.web.servlet.request.RequestPostProcessor
org.springframework.test.web.servlet.client 内の RequestPostProcessor 使用
修飾子と型メソッド説明MockMvcHttpConnector.with
(ListSE<RequestPostProcessor> postProcessors) 指定されたRequestPostProcessor
を実行されたリクエストに適用する新しいインスタンスを作成します。org.springframework.test.web.servlet.request 内の RequestPostProcessor 使用
修飾子と型メソッド説明ConfigurableSmartRequestBuilder.with
(RequestPostProcessor requestPostProcessor) 指定されたRequestPostProcessor
を追加します。MockHttpServletRequestBuilder.with
(RequestPostProcessor postProcessor) MockHttpServletRequestBuilder
に直接組み込まれていない方法でMockHttpServletRequest
をさらに初期化するための拡張ポイント。org.springframework.test.web.servlet.setup 内の RequestPostProcessor 使用
修飾子と型メソッド説明default RequestPostProcessor
MockMvcConfigurer.beforeMockMvcCreated
(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext context) MockMvc ビルダーと Spring WebApplicationContext で MockMvc インスタンスが作成されようとしているときに呼び出され、DispatcherServlet
に渡されます。MockMvcConfigurerAdapter.beforeMockMvcCreated
(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext cxt) SharedHttpSessionConfigurer.beforeMockMvcCreated
(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext context)