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.
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?
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
EDIT I have used a custom ApplicationContextInitializer registered in web.xml
<context-param>
<param-name>contextInitializerClasses</param-name>
<param-value>com.xxx.PropertyInitializer</param-value>
</context-param>
in the initializer class injected the properties. seems it is working fine but then I'm facing another issue stated here. Spring application context is converted to proxy after custom property injection