How to get access to job parameters from ItemReader, in Spring Batch?

前端 未结 7 1653
梦谈多话
梦谈多话 2020-11-30 23:29

This is part of my job.xml:


  
    

        
7条回答
  •  無奈伤痛
    2020-12-01 00:06

    Complement with an additional example, you can access all job parameters in JavaConfig class:

    @Bean
    @StepScope
    public ItemStreamReader reader(@Value("#{jobParameters}") Map jobParameters){
              ....
    }
    

提交回复
热议问题