I have a web application that's based on Spring and the application contexts, applicationContext.xml and myServlet-servlet.xml contain settings that should be configurable by the sysadmin in deployment.
What's the best way to enable changing of settings like [database server details, remote webservice endpoints, etc] without requiring editing of the WAR contents?
Spring provides the PropertyPlaceholderConfigurer which can be used in the beans configurations, but I think that's going to require an absolute path to the properties file, which I'd like to avoid, if for no other reason than to allow multiple instances of the same servlet to run on the same machine.
There's also maybe the option to use JNDI configured resources, though there doesn't appear to be a BeanFactoryPostProcessor implementation out-the-box doing this so it might not be a good way to approach it.
What's the standard best-practice, if there is one, to deal with this sort of requirement?
Related SO entries: