public interface MessageSourceAware extends Aware
MessageSource は、アプリケーションコンテキストで "messageSource" という名前の Bean として定義されているため、通常、Bean 参照として(任意の Bean プロパティまたはコンストラクター引数に)渡すこともできます。
ApplicationContextAware
修飾子と型 | メソッドと説明 |
---|---|
void | setMessageSource(MessageSource messageSource) このオブジェクトが実行される MessageSource を設定します。 |
void setMessageSource(MessageSource messageSource)
通常の Bean プロパティの設定後、InitializingBean の afterPropertiesSet またはカスタム init メソッドのような初期コールバックの前に呼び出されます。ApplicationContextAware の setApplicationContext の前に呼び出されます。
messageSource
- このオブジェクトが使用するメッセージソース