Using Spring Batch JdbcCursorItemReader with NamedParameters

前端 未结 4 826
滥情空心
滥情空心 2021-01-05 13:34

The Spring Batch JdbcCursorItemReader can accept a preparedStatementSetter:



        
4条回答
  •  渐次进展
    2021-01-05 13:58

    You can try with jobParameters. In this case you don't need any PreparedStatementSetter.

    
       
       
       
       
    
    

    pass the value when running the job

    JobParameters param = new JobParametersBuilder().addString("col1", "value1").toJobParameters();
    
    JobExecution execution = jobLauncher.run(job, param);
    

提交回复
热议问题