org.springframework.context

## 接口 ApplicationContextInitializer<C extends ConfigurableApplicationContext>

-     public interface ApplicationContextInitializer<C extends ConfigurableApplicationContext>

  Callback interface for initializing a Spring `ConfigurableApplicationContext` prior to being refreshed.

  Typically used within web applications that require some programmatic initialization of the application context. For example, registering property sources or activating profiles against the context's environment. See `ContextLoader` and `FrameworkServlet` support for declaring a "contextInitializerClasses" context-param and init-param, respectively.

  `ApplicationContextInitializer` processors are encouraged to detect whether Spring's `Ordered` interface has been implemented or if the @`Order` annotation is present and to sort instances accordingly if so prior to invocation.

  从以下版本开始:
    3.1
  作者:
    Chris Beams
  另请参阅:
    `org.springframework.web.context.ContextLoader#customizeContext`, `org.springframework.web.context.ContextLoader#CONTEXT_INITIALIZER_CLASSES_PARAM`, `org.springframework.web.servlet.FrameworkServlet#setContextInitializerClasses`, `org.springframework.web.servlet.FrameworkServlet#applyInitializers`

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `initialize(C applicationContext)` Initialize the given application context.

- - ### 方法详细资料

    - #### initialize

          void initialize(C applicationContext)

      Initialize the given application context.
      参数:
        `applicationContext` - the application to configure