インターフェースの使用
org.springframework.web.context.WebApplicationContext
WebApplicationContext を使用するパッケージ
パッケージ
説明
Spring MVC アプリケーションをテストするためのサーバー側のサポートが含まれています。
MockMvc の AssertJ サポート。
サーバーリクエスト処理のための
MockMvc を使用した WebTestClient を介した Spring MVC アプリケーションのテストのサポート。MockMvc および HtmlUnit を使用して Spring MVC アプリケーションをテストするためのサーバー側のサポート。MockMvc および Selenium HtmlUnitDriver で Spring MVC アプリケーションをテストするためのサーバー側のサポート。 ビルトイン
MockMvcBuilder 実装が含まれています。Web データバインディングのサポートクラス。
Web アプリケーションのアプリケーションコンテキストインターフェースのバリアントと、ルート Web アプリケーションコンテキストをブートストラップする ContextLoaderListener が含まれています。
WebApplicationContext 実装やさまざまなユーティリティクラスなど、
org.springframework.web.context パッケージをサポートするクラス。Bean スタイルの構成を可能にする汎用フィルター基本クラスを提供します。
JSF Web レイヤーを、Spring ルート WebApplicationContext でホストされる Spring サービスレイヤーと統合するためのサポートクラス。
JSF Web レイヤーを、Spring ルート WebApplicationContext でホストされる Spring サービスレイヤーと統合するための ELResolvers。
アプリケーションコンテキストインフラストラクチャと統合するサーブレット、および Spring Web MVC フレームワークのコアインターフェースとクラスを提供します。
Spring の Web MVC フレームワークのサポートクラス。
org.springframework.test.web.servlet 内の WebApplicationContext 使用
型 WebApplicationContext のパラメーターを持つ org.springframework.test.web.servlet のメソッド修飾子と型メソッド説明protected final MockMvcMockMvcBuilderSupport.createMockMvc(FilterEE[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, RequestBuilder defaultRequestBuilder, CharsetSE defaultResponseCharacterEncoding, ListSE<ResultMatcher> globalResultMatchers, ListSE<ResultHandler> globalResultHandlers, ListSE<DispatcherServletCustomizer> dispatcherServletCustomizers) MockMvcインスタンスを作成するためにMockMvcBuilderSupport.createMockMvc(Filter[], MockServletConfig, WebApplicationContext, RequestBuilder, List, List, List)に委譲し、提供されたdefaultResponseCharacterEncodingを使用してそのインスタンスを構成します。protected final MockMvcMockMvcBuilderSupport.createMockMvc(FilterEE[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, RequestBuilder defaultRequestBuilder, ListSE<ResultMatcher> globalResultMatchers, ListSE<ResultHandler> globalResultHandlers, ListSE<DispatcherServletCustomizer> dispatcherServletCustomizers) org.springframework.test.web.servlet.assertj 内の WebApplicationContext 使用
型 WebApplicationContext のパラメーターを持つ org.springframework.test.web.servlet.assertj のメソッド修飾子と型メソッド説明static MockMvcTesterMockMvcTester.from(WebApplicationContext applicationContext) 指定された完全に初期化された(つまり、リフレッシュされた)WebApplicationContextを使用してインスタンスを作成するためのショートカット。static MockMvcTesterMockMvcTester.from(WebApplicationContext applicationContext, FunctionSE<DefaultMockMvcBuilder, MockMvc> customizations) 指定された完全に初期化された(つまり、リフレッシュされた)WebApplicationContextを使用してインスタンスを作成します。org.springframework.test.web.servlet.client 内の WebApplicationContext 使用
型 WebApplicationContext のパラメーターを持つ org.springframework.test.web.servlet.client のメソッド修飾子と型メソッド説明static MockMvcWebTestClient.MockMvcServerSpec<?>MockMvcWebTestClient.bindToApplicationContext(WebApplicationContext context) Spring MVC インフラストラクチャーとコントローラーをWebApplicationContextに提供することにより、WebTestClientの作成を開始します。org.springframework.test.web.servlet.htmlunit 内の WebApplicationContext 使用
型 WebApplicationContext のパラメーターを持つ org.springframework.test.web.servlet.htmlunit のメソッド修飾子と型メソッド説明static MockMvcWebClientBuilderMockMvcWebClientBuilder.webAppContextSetup(WebApplicationContext context) 提供されたWebApplicationContextに基づいて、新しいMockMvcWebClientBuilderを作成します。static MockMvcWebClientBuilderMockMvcWebClientBuilder.webAppContextSetup(WebApplicationContext context, MockMvcConfigurer configurer) 型 WebApplicationContext のパラメーターを持つ org.springframework.test.web.servlet.htmlunit のコンストラクター修飾子コンストラクター説明protectedprotectedMockMvcWebClientBuilder(WebApplicationContext context, MockMvcConfigurer configurer) protected提供されたWebApplicationContextを使用して新しいインスタンスを作成します。protectedMockMvcWebConnectionBuilderSupport(WebApplicationContext context, MockMvcConfigurer configurer) 提供されたWebApplicationContextおよびMockMvcConfigurerを使用して新しいインスタンスを作成します。org.springframework.test.web.servlet.htmlunit.webdriver 内の WebApplicationContext 使用
型 WebApplicationContext のパラメーターを持つ org.springframework.test.web.servlet.htmlunit.webdriver のメソッド修飾子と型メソッド説明static MockMvcHtmlUnitDriverBuilderMockMvcHtmlUnitDriverBuilder.webAppContextSetup(WebApplicationContext context) 提供されたWebApplicationContextに基づいて、新しいMockMvcHtmlUnitDriverBuilderを作成します。static MockMvcHtmlUnitDriverBuilderMockMvcHtmlUnitDriverBuilder.webAppContextSetup(WebApplicationContext context, MockMvcConfigurer configurer) 型 WebApplicationContext のパラメーターを持つ org.springframework.test.web.servlet.htmlunit.webdriver のコンストラクター修飾子コンストラクター説明protectedprotectedMockMvcHtmlUnitDriverBuilder(WebApplicationContext context, MockMvcConfigurer configurer) org.springframework.test.web.servlet.setup 内の WebApplicationContext 使用
修飾子と型メソッド説明protected abstract WebApplicationContextAbstractMockMvcBuilder.initWebAppContext()DispatcherServletに渡されるWebApplicationContextを取得するメソッド。protected WebApplicationContextDefaultMockMvcBuilder.initWebAppContext()protected WebApplicationContextRouterFunctionMockMvcBuilder.initWebAppContext()protected WebApplicationContextStandaloneMockMvcBuilder.initWebAppContext()型 WebApplicationContext のパラメーターを持つ org.springframework.test.web.servlet.setup のメソッド修飾子と型メソッド説明default RequestPostProcessorMockMvcConfigurer.beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext context) MockMvc ビルダーと Spring WebApplicationContext で MockMvc インスタンスが作成されようとしているときに呼び出され、DispatcherServletに渡されます。MockMvcConfigurerAdapter.beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext cxt) SharedHttpSessionConfigurer.beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext context) static DefaultMockMvcBuilderMockMvcBuilders.webAppContextSetup(WebApplicationContext context) 指定された、完全に初期化された(つまり、リフレッシュされた)WebApplicationContextを使用してMockMvcインスタンスを構築します。型 WebApplicationContext のパラメーターを持つ org.springframework.test.web.servlet.setup のコンストラクター修飾子コンストラクター説明protectedDefaultMockMvcBuilder(WebApplicationContext webAppContext) protected コンストラクター。org.springframework.web.bind.support 内の WebApplicationContext 使用
修飾子と型メソッド説明protected WebApplicationContextSpringWebConstraintValidatorFactory.getWebApplicationContext()SpringWebApplicationContextを取得して使用します。org.springframework.web.context 内の WebApplicationContext 使用
org.springframework.web.context 内の WebApplicationContext サブインターフェース修飾子と型インターフェース説明interface設定可能な Web アプリケーションコンテキストによって実装されるインターフェース。修飾子と型メソッド説明protected abstract WebApplicationContextAbstractContextLoaderInitializer.createRootApplicationContext()ContextLoaderListenerに提供される「ルート」アプリケーションコンテキストを作成します。protected WebApplicationContextContextLoader.createWebApplicationContext(ServletContextEE sc) このローダーのルート WebApplicationContext を、デフォルトのコンテキストクラスまたは指定されている場合はカスタムコンテキストクラスのいずれかでインスタンス化します。static WebApplicationContextContextLoader.getCurrentWebApplicationContext()現在のスレッドの Spring ルート Web アプリケーションコンテキストを取得します(つまりContextLoader.initWebApplicationContext(ServletContextEE servletContext) 構築時に提供されたアプリケーションコンテキストを使用して、指定されたサーブレットコンテキストの Spring の Web アプリケーションコンテキストを初期化するか、"contextClass" および "contextConfigLocation" context-params に従って新しいものを作成します。型 WebApplicationContext のパラメーターを持つ org.springframework.web.context のコンストラクター修飾子コンストラクター説明ContextLoader(WebApplicationContext rootContext) 指定されたアプリケーションコンテキストで新しいContextLoaderを作成します。ContextLoaderListener(WebApplicationContext rootContext) 指定されたアプリケーションコンテキストを使用して新しいContextLoaderListenerを作成し、機能に関して仕様が制限されているServletContextEventEE -providedServletContextEE 参照を使用して初期化します。ContextLoaderListener(WebApplicationContext rootContext, ServletContextEE servletContext) 指定されたアプリケーションコンテキストで新しいContextLoaderListenerを作成します。org.springframework.web.context.support 内の WebApplicationContext 使用
修飾子と型クラス説明classWeb 環境用のConfigurableWebApplicationContextインターフェースを実装するAbstractRefreshableApplicationContextサブクラス。classコンポーネントクラスを入力として受け入れるWebApplicationContext実装 — 特に@Configurationクラスだけでなく、プレーンな@Componentクラス、jakarta.injectアノテーションを使用する JSR-330 準拠のクラス。classWeb 環境に適したGenericApplicationContextのサブクラス。classGroovyBeanDefinitionReaderで理解されるように、Groovy Bean 定義スクリプトおよび / または XML ファイルから構成を取得するWebApplicationContext実装。classテスト用の静的WebApplicationContext実装。classXmlBeanDefinitionReaderが理解する XML ドキュメントから構成を取得するWebApplicationContext実装。修飾子と型メソッド説明static WebApplicationContextWebApplicationContextUtils.findWebApplicationContext(ServletContextEE sc) この Web アプリの一意のWebApplicationContextを見つけます。ルート Web アプリのコンテキスト(推奨)または登録済みServletContext属性の中で一意のWebApplicationContext(通常、現在の Web アプリケーションの単一のDispatcherServletから取得)。static WebApplicationContextWebApplicationContextUtils.getRequiredWebApplicationContext(ServletContextEE sc) この Web アプリのルートWebApplicationContextを見つけます。通常はContextLoaderListenerを介してロードされます。final WebApplicationContextContextExposingHttpServletRequest.getWebApplicationContext()このリクエストが実行される WebApplicationContext を返します。static WebApplicationContextWebApplicationContextUtils.getWebApplicationContext(ServletContextEE sc) この Web アプリのルートWebApplicationContextを見つけます。通常はContextLoaderListenerを介してロードされます。static WebApplicationContextWebApplicationContextUtils.getWebApplicationContext(ServletContextEE sc, StringSE attrName) この Web アプリのカスタムWebApplicationContextを見つけます。protected final WebApplicationContextWebApplicationObjectSupport.getWebApplicationContext()現在のアプリケーションコンテキストを WebApplicationContext として返します。型 WebApplicationContext のパラメーターを持つ org.springframework.web.context.support のコンストラクター修飾子コンストラクター説明ContextExposingHttpServletRequest(HttpServletRequestEE originalRequest, WebApplicationContext context) 指定されたリクエストに対して新しい ContextExposingHttpServletRequest を作成します。ContextExposingHttpServletRequest(HttpServletRequestEE originalRequest, WebApplicationContext context, SetSE<StringSE> exposedContextBeanNames) 指定されたリクエストに対して新しい ContextExposingHttpServletRequest を作成します。org.springframework.web.filter 内の WebApplicationContext 使用
修飾子と型メソッド説明protected WebApplicationContextDelegatingFilterProxy.findWebApplicationContext()可能な場合、構築時に渡されたWebApplicationContextを返します。型 WebApplicationContext のパラメーターを持つ org.springframework.web.filter のメソッド修飾子と型メソッド説明protected FilterEEDelegatingFilterProxy.initDelegate(WebApplicationContext wac) Bean として指定された Spring アプリケーションコンテキストとして定義されたフィルターデリゲートを初期化します。型 WebApplicationContext のパラメーターを持つ org.springframework.web.filter のコンストラクター修飾子コンストラクター説明DelegatingFilterProxy(StringSE targetBeanName, WebApplicationContext wac) 指定された SpringWebApplicationContextから名前付きターゲット Bean を取得する新しいDelegatingFilterProxyを作成します。org.springframework.web.jsf 内の WebApplicationContext 使用
修飾子と型メソッド説明static WebApplicationContextFacesContextUtils.getRequiredWebApplicationContext(FacesContextEE fc) この Web アプリのルートWebApplicationContextを見つけます。通常はContextLoaderListenerを介してロードされます。protected WebApplicationContextDelegatingNavigationHandlerProxy.getWebApplicationContext(FacesContextEE facesContext) Bean 名前解決を委譲する Web アプリケーションコンテキストを取得します。protected WebApplicationContextDelegatingPhaseListenerMulticaster.getWebApplicationContext(FacesContextEE facesContext) Bean 名前解決を委譲する Web アプリケーションコンテキストを取得します。static WebApplicationContextFacesContextUtils.getWebApplicationContext(FacesContextEE fc) この Web アプリのルートWebApplicationContextを見つけます。通常はContextLoaderListenerを介してロードされます。org.springframework.web.jsf.el 内の WebApplicationContext 使用
修飾子と型メソッド説明protected WebApplicationContextSpringBeanFacesELResolver.getWebApplicationContext(ELContextEE elContext) Bean 名前解決を委譲する Web アプリケーションコンテキストを取得します。protected WebApplicationContextWebApplicationContextFacesELResolver.getWebApplicationContext(ELContextEE elContext) WebApplicationContext参照を取得して公開します。org.springframework.web.servlet 内の WebApplicationContext 使用
修飾子と型メソッド説明protected WebApplicationContextFrameworkServlet.createWebApplicationContext(ApplicationContext parent) このサーブレットの WebApplicationContext(デフォルトのXmlWebApplicationContextまたは設定されている場合はcustom context class)をインスタンス化します。protected WebApplicationContextFrameworkServlet.createWebApplicationContext(WebApplicationContext parent) このサーブレットの WebApplicationContext(デフォルトのXmlWebApplicationContextまたは設定されている場合はcustom context class)をインスタンス化します。protected WebApplicationContextFrameworkServlet.findWebApplicationContext()final WebApplicationContextFrameworkServlet.getWebApplicationContext()このサーブレットの WebApplicationContext を返します。protected WebApplicationContextFrameworkServlet.initWebApplicationContext()このサーブレットの WebApplicationContext を初期化して公開します。型 WebApplicationContext のパラメーターを持つ org.springframework.web.servlet のメソッド修飾子と型メソッド説明protected WebApplicationContextFrameworkServlet.createWebApplicationContext(WebApplicationContext parent) このサーブレットの WebApplicationContext(デフォルトのXmlWebApplicationContextまたは設定されている場合はcustom context class)をインスタンス化します。型 WebApplicationContext のパラメーターを持つ org.springframework.web.servlet のコンストラクター修飾子コンストラクター説明DispatcherServlet(WebApplicationContext webApplicationContext) 指定された Web アプリケーションコンテキストで新しいDispatcherServletを作成します。FrameworkServlet(WebApplicationContext webApplicationContext) 指定された Web アプリケーションコンテキストで新しいFrameworkServletを作成します。org.springframework.web.servlet.support 内の WebApplicationContext 使用
修飾子と型メソッド説明protected WebApplicationContextAbstractAnnotationConfigDispatcherServletInitializer.createRootApplicationContext()ContextLoaderListenerに提供される「ルート」アプリケーションコンテキストを作成します。protected WebApplicationContextAbstractAnnotationConfigDispatcherServletInitializer.createServletApplicationContext()DispatcherServletに提供されるサーブレットアプリケーションコンテキストを作成します。protected abstract WebApplicationContextAbstractDispatcherServletInitializer.createServletApplicationContext()DispatcherServletに提供されるサーブレットアプリケーションコンテキストを作成します。static WebApplicationContextRequestContextUtils.findWebApplicationContext(HttpServletRequestEE request) リクエスト処理を開始した DispatcherServlet に関連付けられている WebApplicationContext を探し、現在のリクエストに関連付けられているものが見つからなかった場合はグローバルコンテキストを探します。static WebApplicationContextRequestContextUtils.findWebApplicationContext(HttpServletRequestEE request, ServletContextEE servletContext) リクエスト処理を開始した DispatcherServlet に関連付けられている WebApplicationContext を探し、現在のリクエストに関連付けられているものが見つからなかった場合はグローバルコンテキストを探します。final WebApplicationContextRequestContext.getWebApplicationContext()現在の WebApplicationContext を返します。型 WebApplicationContext のパラメーターを持つ org.springframework.web.servlet.support のメソッド修飾子と型メソッド説明protected FrameworkServletAbstractDispatcherServletInitializer.createDispatcherServlet(WebApplicationContext servletAppContext)