Can we write a Spring Batch Job Without ItemReader and ItemWriter

前端 未结 1 668
迷失自我
迷失自我 2020-12-11 06:04

In my project, I have written a Quartz scheduler with Spring Batch 2.2.

As per my requirement, I want to run a scheduler to fetch application config property to refr

1条回答
  •  一个人的身影
    2020-12-11 06:37

    Use a Tasklet

    
      
        
      
      
     
    
    
    
    class MyTasklet implements Tasklet {
      @Override
      public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
      }
    }
    

    You can read more on Tasklet at chapter 5.2 from official doc

    0 讨论(0)
提交回复
热议问题