Top Description Methods
org.springframework.context

public Interface ApplicationContextInitializer<C extends ConfigurableApplicationContext>

Known Direct Subinterfaces
org.springframework.context.aot.AotApplicationContextInitializer
Annotations
@FunctionalInterface
Type Parameters
<C>
the application context type

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.

Author
Chris Beams
Since
3.1
See Also
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

Method Summary

Modifier and TypeMethod and Description
public void
initialize(C
the application to configure
applicationContext
)

Initialize the given application context.

Method Detail

initializeback to summary
public void initialize(C applicationContext)

Initialize the given application context.

Parameters
applicationContext:C

the application to configure