Spring 3.1 introduced a very convenient hook for customizing the application context with ApplicationContextInitializer. It can be used to set active profiles and register custom property sources.
The web.xml can configure the “contextInitializerClasses”.
…