How can I have spring create a default configuration file for the end user if it does not exist at the target location. I would like this configuration file to be mapped to a bean after it has been created. I've searched the internet for spring tutorials but I have been unable to find one that demonstrates this.
I would like to have a system that does the following:
- Scans for configuration beans
- Checks if the configuration file exists on the file system
- Writes configuration defaults to the file if it does not exist
- Maps the values to the configuration bean