org.springframework.context

## 接口 MessageSourceAware

- 所有超级接口:
    org.springframework.beans.factory.Aware

      public interface MessageSourceAware
      extends org.springframework.beans.factory.Aware

  Interface to be implemented by any object that wishes to be notified of the MessageSource (typically the ApplicationContext) that it runs in.

  Note that the MessageSource can usually also be passed on as bean reference (to arbitrary bean properties or constructor arguments), because it is defined as bean with name "messageSource" in the application context.

  从以下版本开始:
    1.1.1
  作者:
    Juergen Hoeller, Chris Beams
  另请参阅:
    `ApplicationContextAware`

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `setMessageSource(MessageSource messageSource)` Set the MessageSource that this object runs in.

- - ### 方法详细资料

    - #### setMessageSource

          void setMessageSource(MessageSource messageSource)

      Set the MessageSource that this object runs in.

      Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked before ApplicationContextAware's setApplicationContext.

      参数:
        `messageSource` - message sourceto be used by this object