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