title: loading spring properties files from S3 bucket
body: <p>We have a application which is running on amazon EC2. we are planning to migrate it to elastic beanstalk environment. our application has two configuration files which stores some endpoints and few other control parameters. currently those are loaded as spring properties and injected to respective beans. we are thinking of putting them in to a S3 bucket and read them while loading the spring context. tries different approaches but still not luck.</p>
  
  <p>1) what would be best advisable way to read the properties file with aws elastic beanstalk. we do not like to put them all as environment variables?</p>
  
  <p>2) I tried creating a class extending
      org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
  and tried by overriding processProperties method. but it seems annotation based property injection happens before calling this method. instance was created but the processPRoperties method was not called? any idea how this could be handled will be appreciated</p>
  
  <p>EDIT
  I have used a custom ApplicationContextInitializer registered in web.xml</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;contextInitializerClasses&lt;/param-name&gt;
      &lt;param-value&gt;com.xxx.PropertyInitializer&lt;/param-value&gt;
  &lt;/context-param&gt;
  </code></pre>
  
  <p>in the initializer class injected the properties. seems it is working fine but then I'm facing another issue stated here.
  <a href="https://stackoverflow.com/questions/39726683/spring-application-context-is-converted-to-proxy-after-custom-property-injection">Spring application context is converted to proxy after custom property injection</a></p>