title: How do you override the default JobLauncher? Spring Batch Annotations
body: <p>Are there any pure annotations based documentation for Spring? 90% of the docs I have seen are written for the xml implementation.</p>
  
  <p>I am trying to override the default JobLauncher to be able to pass JobParameters, but any JobLauncher function I added to the below code was ignored and the default SimpleJobLauncher is run instead.</p>
  
  <p>I would like to launch 4 concurrent instances of the same job with 4 different Job parameters. The parameters should tell the reader which directory to read from.</p>
  
  <p>I am able to pass values for the directory using the @Value annotation, but that appears to only allow me to set a default value that will not change between runs.</p>
  
  <p>I am not able to configure the job when I create it ("World" is completely ignored)</p>
  
  <pre><code>@EnableBatchProcessing
  @Configuration
  public class BatchConfiguration{
      private static final Logger log = LoggerFactory.getLogger(BatchConfiguration.class);
  
      @Resource
      public JobLauncher jobLauncher;
  
      @Resource
      public JobBuilderFactory jobBuilderFactory;
  
      @Resource
      public StepBuilderFactory stepBuilderFactory;
  
      @Bean
      @StepScope
      ItemReader&lt;Record&gt; reader(@Value("") String directory) {
          return new ExcelReader(directory);
      }
  
      @Bean
      public ItemProcessor processor() {
          return new ItemProcessor();
      }
  
      @Bean
      public JobCompletionNotificationListener listener(){
          return new JobCompletionNotificationListener();
      }
  
      @Bean
      public Writer writer() {
          Writer writer = new Writer();
          return writer;
      }
  
      //Job Definition
      @Bean
      public Job job(JobCompletionNotificationListener listener) {
          return jobBuilderFactory.get("job")
                  .listener(listener)
                  .flow(step1("World"))
                  .end()
                  .build();
      }
  
      @Bean
      public Step step1(String directory) {
          return stepBuilderFactory.get("step1")
                  .&lt;Record, Record&gt; chunk(10)
                  .reader(reader(directory))
                  .processor(processor())
                  .writer(writer())
                  .build();
      }
  }
  </code></pre>
  
  <p>I am starting my application using </p>
  
  <pre><code>    SpringApplication.run(Application.class, args);
  </code></pre>
  
  <p>is there a better way to start the application??</p>