I'm writing a Spring Batch application and have split the Spring Beans Configuration into multiple files;
- batch/launchContext.xml (JobLauncher/JobRepository etc)
- batch/common.xml (common beans used in all jobs)
- dataSource.xml (the data source)
- batch/jobs/myJob.xml (individual files for jobs)
The reason for this is because I wish the data source to be changed between dev/test/production setup and also to save re-writing the same bean definitions over-and-over again.
The problem lies when I wish to launch a Spring Batch application. When reading the instructions here http://static.springsource.org/spring-batch/reference/html/configureJob.html#runningJobsFromCommandLine it assumes one Spring configuration file per job, but that's not how I wish to do it.
How may I run a Spring Batch job, from the command line, which uses multiple bean configuration files?