Spring web Application Context
<p>In my web application I am creating a CustomWebApplicationInitializer which is extending from AbstractAnnotationConfigDispatcherServletInitializer. 
I need to add another property source for the application. I am doing so in the onStartup method as below by setting the InitParameter in servletContext. </p>

<pre><code>  public class MvcWebApplicationInitializer extends
      AbstractAnnotationConfigDispatcherServletInitializer {
    private static final String[] SERVLET_MAPPINGS = new String[] {"/"};
    private static final String SESSION_COOKIE_PATH = "/";

    @Override
    protected Class&lt;?&gt;[] getRootConfigClasses() {
      return new Class[] {AppConfig.class};
    }

    @Override
    protected Class&lt;?&gt;[] getServletConfigClasses() {
      return new Class[] {WebConfig.class};
    }

    @Override
    protected String[] getServletMappings() {
      return SERVLET_MAPPINGS;
    }


    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        super.onStartup(servletContext);
        servletContext.setInitParameter("contextInitializerClasses", "com.test.myproject.MyTestPropertySourceInitializer");
    }
  }
</code></pre>

<p>MyTestPropertySourceInitializer implements ApplicationContextInitializer and checks if the value of a certain property is set to true. </p>

<pre><code> public void initialize(ConfigurableApplicationContext applicationContext) {
    ConfigurableEnvironment env = applicationContext.getEnvironment();
    Boolean testPropEnabled = (Boolean) env.getProperty("testProperty.enabled", Boolean.class);
</code></pre>

<p>I have set that property value to true. But in the logs value is false and it does not process as expected. So I think that by the time the initialize method is called, the property file is not loaded in applicationContext. 
Please advise how I can get this working. Thanks in advance. </p>