インターフェースの使用
org.springframework.context.MessageSource
MessageSource を使用するパッケージ
パッケージ
説明
このパッケージは、beans パッケージに基づいて構築され、メッセージソースと Observer デザインパターンのサポート、および一貫性のある API を使用してリソースを取得するアプリケーションオブジェクトの機能を追加します。
JSR-250「共通」アノテーション、コンポーネントスキャン、Spring 管理オブジェクトを作成するための Java ベースのメタデータなど、アプリケーションコンテキストのアノテーションサポート。
ApplicationContext 実装および MessageSource 実装の抽象基本クラスなど、org.springframework.context パッケージをサポートするクラス。
JSR-303 Bean 検証プロバイダー(Hibernate Validator など)を Spring ApplicationContext に、特に Spring のデータバインディングおよび検証 API と統合するためのサポートクラス。
Spring の Web インフラストラクチャと他のフレームワークモジュール間の最小境界点を定義する一般的な汎用インターフェース。
Web 固有のデータバインディング機能を提供します。
Web データバインディングのサポートクラス。
Web アプリケーションのアプリケーションコンテキストインターフェースのバリアントと、ルート Web アプリケーションコンテキストをブートストラップする ContextLoaderListener が含まれています。
WebApplicationContext 実装やさまざまなユーティリティクラスなど、
org.springframework.web.context パッケージをサポートするクラス。Spring MVC の
org.springframework.web.servlet.mvc.method パッケージで使用される、ハンドラーメソッド処理の共通インフラストラクチャ。 アノテーションベースのハンドラーメソッド処理のクラスをサポートします。
ハンドラーメソッド処理の汎用サポートクラス。
アノテーションベースのハンドラーメソッド処理のインフラストラクチャ。
ビューの解決による結果処理のサポート。
Spring の一般的なリアクティブ Web サポートのコアインターフェースとクラス。
アノテーションベースのサーブレット MVC コントローラーのサポートパッケージ。
org.springframework.web.method.annotation パッケージに基づいた、アノテーションベースのハンドラーメソッド処理のための MVC インフラストラクチャ。Spring の Web MVC フレームワークのサポートクラス。
このパッケージには、JSP 2.0 + 用の Spring の JSP 標準タグライブラリが含まれています。
カスタム実装の抽象基本クラスを含む、標準の View および ViewResolver 実装を提供します。
HTML エスケープや Cookie 処理などのその他の Web ユーティリティクラス。
org.springframework.context 内の MessageSource 使用
org.springframework.context 内の MessageSource サブインターフェース修飾子と型インターフェース説明interfaceアプリケーションの構成を提供する主要インターフェース。interfaceほとんどのアプリケーションコンテキストによって実装される SPI インターフェース。interfaceメッセージを階層的に解決できるオブジェクトによって実装される MessageSource のサブインターフェース。MessageSource を返す org.springframework.context のメソッド修飾子と型メソッド説明HierarchicalMessageSource.getParentMessageSource()この MessageSource の親、または存在しない場合はnullを返します。型 MessageSource のパラメーターを持つ org.springframework.context のメソッド修飾子と型メソッド説明voidMessageSourceAware.setMessageSource(MessageSource messageSource) このオブジェクトが実行されるMessageSourceを設定します。voidHierarchicalMessageSource.setParentMessageSource(@Nullable MessageSource parent) このオブジェクトが解決できないメッセージを解決しようとするために使用される親を設定します。org.springframework.context.annotation 内の MessageSource 使用
MessageSource を実装している org.springframework.context.annotation のクラス修飾子と型クラス説明classコンポーネントクラスを入力として受け入れるスタンドアロンアプリケーションコンテキスト— 特に@Configurationアノテーション付きクラスだけでなく、プレーン@Component型およびjakarta.injectアノテーションを使用する JSR-330 準拠クラスも受け入れます。org.springframework.context.support 内の MessageSource 使用
MessageSource を実装している org.springframework.context.support のクラス修飾子と型クラス説明classApplicationContextインターフェースの抽象的な実装。classHierarchicalMessageSourceインターフェースの抽象的な実装、メッセージバリアントの一般的な処理の実装、具体的な MessageSource の特定の戦略の実装を容易にします。classAbstractApplicationContext.refresh()への複数の呼び出しをサポートすることになっているApplicationContext実装の基本クラスで、毎回新しい内部 Bean ファクトリインスタンスを作成します。class指定された構成の場所の一般的な処理を追加するAbstractRefreshableApplicationContextサブクラス。classResourceBundleMessageSourceやReloadableResourceBundleMessageSourceなどのリソースバンドル規則に基づくMessageSource実装の抽象基本クラス。classApplicationContext実装の便利な基本クラス。XmlBeanDefinitionReaderが理解する Bean 定義を含む XML ドキュメントから構成を描画します。classスタンドアロン XML アプリケーションコンテキスト。クラスパスからコンテキスト定義ファイルを取得し、プレーンパスをパッケージパスを含むクラスパスリソース名として解釈します (例: "mypackage/myresource.txt")。classすべての呼び出しを親 MessageSource に委譲する空のMessageSource。classスタンドアロン XML アプリケーションコンテキスト。ファイルシステムまたは URL からコンテキスト定義ファイルを取得し、プレーンパスを相対的なファイルシステムの場所として解釈します (例: "mydir/myfile.txt")。class単一の内部DefaultListableBeanFactoryインスタンスを保持し、特定の Bean 定義フォーマットを想定しない汎用 ApplicationContext 実装。classGenericApplicationContextを継承し、GroovyObjectを実装するApplicationContext実装。AbstractApplicationContext.getBean(String)を使用する代わりに、ドット参照解除構文で Bean を取得できます。class組み込みの XML サポートを備えた便利なアプリケーションコンテキスト。class指定されたベース名を使用してリソースバンドルにアクセスし、SpringApplicationContextのリソースロードに参加する、Spring 固有のMessageSource実装。class指定されたベース名を使用してリソースバンドルにアクセスするMessageSource実装。class外部構成ソースから Bean 定義を読み取るのではなく、Bean およびメッセージのプログラムによる登録をサポートするApplicationContext実装。classメッセージをプログラムで登録できるMessageSourceの簡単な実装。修飾子と型メソッド説明protected @Nullable MessageSourceAbstractApplicationContext.getInternalParentMessageSource()親コンテキストの内部メッセージソースも AbstractApplicationContext の場合は返します。それ以外の場合は、親コンテキスト自体を返します。AbstractMessageSource.getParentMessageSource()DelegatingMessageSource.getParentMessageSource()型 MessageSource のパラメーターを持つ org.springframework.context.support のメソッド修飾子と型メソッド説明voidAbstractMessageSource.setParentMessageSource(@Nullable MessageSource parent) voidDelegatingMessageSource.setParentMessageSource(@Nullable MessageSource parent) 型 MessageSource のパラメーターを持つ org.springframework.context.support のコンストラクター修飾子コンストラクター説明MessageSourceAccessor(MessageSource messageSource) LocaleContextHolder のロケールをデフォルトのロケールとして使用して、新しい MessageSourceAccessor を作成します。MessageSourceAccessor(MessageSource messageSource, LocaleSE defaultLocale) 指定されたデフォルトのロケールを使用して、新しい MessageSourceAccessor を作成します。MessageSourceResourceBundle(MessageSource source, LocaleSE locale) 指定された MessageSource およびロケールに対して新しい MessageSourceResourceBundle を作成します。MessageSourceResourceBundle(MessageSource source, LocaleSE locale, ResourceBundleSE parent) 指定された MessageSource およびロケールに対して新しい MessageSourceResourceBundle を作成します。org.springframework.validation.beanvalidation 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.validation.beanvalidation のメソッド修飾子と型メソッド説明voidLocalValidatorFactoryBean.setValidationMessageSource(MessageSource messageSource) クラスパスの JSR-303 のデフォルトの "ValidationMessages.properties" バンドルに依存する代わりに、検証メッセージを解決するためのカスタム Spring MessageSource を指定します。型 MessageSource のパラメーターを持つ org.springframework.validation.beanvalidation のコンストラクター修飾子コンストラクター説明MessageSourceResourceBundleLocator(MessageSource messageSource) 指定された MessageSource の MessageSourceResourceBundleLocator を構築します。org.springframework.web 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.web のメソッド修飾子と型メソッド説明default ErrorResponseErrorResponse.Builder.build(@Nullable MessageSource messageSource, LocaleSE locale) ErrorResponseインスタンスを構築し、指定されたMessageSourceを通じて「詳細」と「タイトル」も解決します。ErrorResponse.getDetailMessageArguments(MessageSource messageSource, LocaleSE locale) メッセージ引数値を解決するために指定されたMessageSourceを使用するErrorResponse.getDetailMessageArguments()のバリアント。default ProblemDetailErrorResponse.updateAndGetBody(@Nullable MessageSource messageSource, LocaleSE locale) 指定されたMessageSourceを使用してtype、title、detailメッセージコードを解決し、解決された値を使用してErrorResponse.getBody()の対応するフィールドを更新します。org.springframework.web.bind 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.web.bind のメソッド修飾子と型メソッド説明ObjectSE[]MethodArgumentNotValidException.getDetailMessageArguments(MessageSource source, LocaleSE locale) org.springframework.web.bind.support 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.web.bind.support のメソッド修飾子と型メソッド説明ObjectSE[]WebExchangeBindException.getDetailMessageArguments(MessageSource source, LocaleSE locale) org.springframework.web.context 内の MessageSource 使用
org.springframework.web.context 内の MessageSource サブインターフェース修飾子と型インターフェース説明interface設定可能な Web アプリケーションコンテキストによって実装されるインターフェース。interfaceWeb アプリケーションの構成を提供するインターフェース。org.springframework.web.context.support 内の MessageSource 使用
MessageSource を実装している org.springframework.web.context.support のクラス修飾子と型クラス説明classWeb 環境用のConfigurableWebApplicationContextインターフェースを実装するAbstractRefreshableApplicationContextサブクラス。classコンポーネントクラスを入力として受け入れるWebApplicationContext実装 — 特に@Configurationクラスだけでなく、プレーンな@Componentクラス、jakarta.injectアノテーションを使用する JSR-330 準拠のクラス。classWeb 環境に適したGenericApplicationContextのサブクラス。classGroovyBeanDefinitionReaderで理解されるように、Groovy Bean 定義スクリプトおよび / または XML ファイルから構成を取得するWebApplicationContext実装。classテスト用の静的WebApplicationContext実装。classXmlBeanDefinitionReaderが理解する XML ドキュメントから構成を取得するWebApplicationContext実装。org.springframework.web.method 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.web.method のコンストラクター修飾子コンストラクター説明protectedHandlerMethod(ObjectSE bean, MethodSE method, @Nullable MessageSource messageSource) サブクラスから使用するためにMessageSourceも受け入れるHandlerMethod(Object, Method)のバリアント。HandlerMethod(StringSE beanName, BeanFactory beanFactory, @Nullable MessageSource messageSource, MethodSE method) MessageSourceも受け入れるHandlerMethod(String, BeanFactory, Method)のバリアント。org.springframework.web.method.annotation 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.web.method.annotation のメソッド修飾子と型メソッド説明ObjectSE[]HandlerMethodValidationException.getDetailMessageArguments(MessageSource messageSource, LocaleSE locale) org.springframework.web.method.support 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.web.method.support のコンストラクター修飾子コンストラクター説明protectedInvocableHandlerMethod(ObjectSE bean, MethodSE method, @Nullable MessageSource messageSource) サブクラスで使用するためのMessageSourceも受け入れるInvocableHandlerMethod(Object, Method)のバリアント。org.springframework.web.reactive.result.method.annotation 内の MessageSource 使用
修飾子と型メソッド説明protected @Nullable MessageSourceResponseEntityExceptionHandler.getMessageSource()この例外ハンドラーが使用するMessageSourceを取得します。型 MessageSource のパラメーターを持つ org.springframework.web.reactive.result.method.annotation のメソッドorg.springframework.web.reactive.result.view 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.web.reactive.result.view のコンストラクター修飾子コンストラクター説明RequestContext(ServerWebExchange exchange, MapSE<StringSE, ObjectSE> model, MessageSource messageSource) RequestContext(ServerWebExchange exchange, MapSE<StringSE, ObjectSE> model, MessageSource messageSource, @Nullable RequestDataValueProcessor dataValueProcessor) org.springframework.web.server 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.web.server のメソッド修飾子と型メソッド説明ResponseStatusException.updateAndGetBody(@Nullable MessageSource messageSource, LocaleSE locale) org.springframework.web.servlet.mvc.annotation 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.web.servlet.mvc.annotation のメソッド修飾子と型メソッド説明voidResponseStatusExceptionResolver.setMessageSource(@Nullable MessageSource messageSource) org.springframework.web.servlet.mvc.method.annotation 内の MessageSource 使用
修飾子と型メソッド説明protected @Nullable MessageSourceResponseEntityExceptionHandler.getMessageSource()この例外ハンドラーが使用するMessageSourceを取得します。型 MessageSource のパラメーターを持つ org.springframework.web.servlet.mvc.method.annotation のメソッド型 MessageSource のパラメーターを持つ org.springframework.web.servlet.mvc.method.annotation のコンストラクター修飾子コンストラクター説明ServletInvocableHandlerMethod(ObjectSE handler, MethodSE method, @Nullable MessageSource messageSource) ServletInvocableHandlerMethod(Object, Method)のバリアントで、たとえばMessageSourceも受け入れて、@ResponseStatusメッセージを解決します。org.springframework.web.servlet.support 内の MessageSource 使用
修飾子と型メソッド説明static MessageSourceJstlUtils.getJstlAwareMessageSource(@Nullable jakarta.servlet.ServletContext servletContext, MessageSource messageSource) JSTL の "jakarta.servlet.jsp.jstl.fmt.localizationContext" context-param をチェックし、提供された Spring 定義の MessageSource を親として、対応する子メッセージソースを作成します。RequestContext.getMessageSource()使用する MessageSource (通常は現在の WebApplicationContext) を返します。型 MessageSource のパラメーターを持つ org.springframework.web.servlet.support のメソッド修飾子と型メソッド説明static voidJstlUtils.exposeLocalizationContext(jakarta.servlet.http.HttpServletRequest request, @Nullable MessageSource messageSource) Spring のロケールと MessageSource を使用して、JSTL のフォーマットとメッセージタグのロケールとリソースバンドルを指定する JSTL 固有のリクエスト属性を公開します。static MessageSourceJstlUtils.getJstlAwareMessageSource(@Nullable jakarta.servlet.ServletContext servletContext, MessageSource messageSource) JSTL の "jakarta.servlet.jsp.jstl.fmt.localizationContext" context-param をチェックし、提供された Spring 定義の MessageSource を親として、対応する子メッセージソースを作成します。org.springframework.web.servlet.tags 内の MessageSource 使用
修飾子と型メソッド説明protected MessageSourceMessageTag.getMessageSource()現在の RequestContext のアプリケーションコンテキストを MessageSource として使用します。org.springframework.web.servlet.view 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.web.servlet.view のコンストラクターorg.springframework.web.util 内の MessageSource 使用
型 MessageSource のパラメーターを持つ org.springframework.web.util のメソッド修飾子と型メソッド説明static <E extends MessageSourceResolvable>
MapSE<E, StringSE> BindErrorUtils.resolve(ListSE<E> errors, MessageSource messageSource, LocaleSE locale) 指定されたMessageSourceを通じてすべてのエラーを解決します。static StringSEBindErrorUtils.resolveAndJoin(CharSequenceSE delimiter, CharSequenceSE prefix, CharSequenceSE suffix, ListSE<? extends MessageSourceResolvable> errors, MessageSource messageSource, LocaleSE locale) 指定されたMessageSourceを通じてすべてのエラーを解決し、結合します。static StringSEBindErrorUtils.resolveAndJoin(ListSE<? extends MessageSourceResolvable> errors, MessageSource messageSource, LocaleSE locale) 区切り文字として", and "、空のプレフィックスとサフィックスを使用したBindErrorUtils.resolveAndJoin(CharSequence, CharSequence, CharSequence, List, MessageSource, Locale)のショートカット。