|
So I've been writing a standalone java application for some time now, and it's about time I make it read it's configuration information from some kind of config file (or files) instead of what I'm doing now (hardcoding a lot of variables into the source code.)
I'm looking for strategies on how to do this. My application is basically made up of one main class that runs a monte carlo process and you can add any number of observer objects that observe the process as it unfolds. I would like to be able to configure what kind of instances of observers are added, and configure each one of them. I'm currently thinking about creating an XML file format for configuring it, but I thought I'd ask around for advice first, in case there is an obvious, often used and useful solution to this kind of problem. Spring perhaps?
Thanks! |