mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-27 09:39:04 +00:00
5a7d2a91ba4848d70233ac9b677fb994c391f3d6
Designed primarily for use in conjunction with web applications to provide a convenient mechanism for configuring the container programmatically. ApplicationContextInitializer implementations are specified through the new "contextInitializerClasses" servlet context parameter, then detected and invoked by ContextLoader in its customizeContext() method. In any case, the semantics of ApplicationContextInitializer's initialize(ConfigurableApplicationContext) method require that invocation occur *prior* to refreshing the application context. ACI implementations may also implement Ordered/PriorityOrdered and ContextLoader will sort instances appropriately prior to invocation. Specifically, this new support provides a straightforward way to programmatically access the container's Environment for the purpose of adding, removing or otherwise manipulating PropertySource objects. See Javadoc for further details. Also note that ApplicationContextInitializer semantics overlap to some degree with Servlet 3.0's notion of ServletContainerInitializer classes. As Spring 3.1 development progresses, we'll likely see these two come together and further influence one another. git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3882 50f2f4bb-b051-0410-bef5-90022cba6387
Languages
Java
97.6%
Kotlin
2.3%