Comment obtenir de l'Emploi paramètres à l'élément de processeur à l'aide de spring Batch annotation

Je suis à l'aide de spring MVC. De mon contrôleur, je fais appel jobLauncher et dans jobLauncher je suis de passage de paramètres de travail comme ci-dessous et je suis à l'aide d'annotations pour activer la configuration comme ci-dessous:

@Configuration
@EnableBatchProcessing
public class BatchConfiguration {
        //read, write ,process and invoke job
} 

JobParameters jobParameters = new JobParametersBuilder().addString("fileName", "xxxx.txt").toJobParameters();
stasrtjob = jobLauncher.run(job, jobParameters);                              

and here is my itemprocessor                                                         
public class DataItemProcessor implements ItemProcessor<InputData, OutPutData> {

  public OutPutData process(final InputData inputData) throws Exception {

        //i want to get job Parameters here ????

  }

}

OriginalL'auteur Mare | 2015-07-31