May 16th, 2012, 03:52 PM
External properties configuration.
I am working on a project and I need to be able to store some properties in an external .properties file so that they can be different per environment. It looks like I can do this a few different ways. One route seems to be using a PropertyPlaceholderConfigurer and subclassing it to override the convert method. This concerns me as the PropertyPlaceholderConfigurer is already being used for some other property files. Could I create a separate bean using my subclassed version and use that to get my properties files in?
My other thought is to start using the Apache Commons Configuration. It looks like that will do the conversion for me.
Would it matter which route I go? Is one better practice than the other? Or is it entirely dependent on my application?
Any advice, comments, thoughts, ect are greatly appreciated.
Tags for this Thread