Play!Framework provides a very good feature that enable you to configure different set of configurations, hence I could have something like
storage=fs
storage.fs.home.dir=...
storage.fs.home.url=...
...
%at.storage=s3
%at.storage.s3.key=...
%at.storage.s3.secret=...
...
%prod.storage=s3
%prod.storage.s3.key=...
%prod.storage.s3.secret=...
...
By default the application is use fs (filesystem) storage, if application started using --%at
(acceptance test) mode, it uses aws s3 as storage implementation, and if application started with --%prod
, the production mode, it also use s3 storage but could with different S3 configuration. This feature makes it very easy to version control the application configuration file, you don't need to update configuration file when deploy to a live server or acceptance testing server.
I am curious has anyone implemented certain mechanism for a Spring framework based application.