<!-- Step One is to Create the File & store it locally -->
<batch:step id="generateFile" >
<batch:chunk reader="reader" writer="writer" commit-interval="20" />
<!-- Step Two is to Create the File & store it locally -->
<batch:chunk reader="dummyItemReader" processor="FileFTP" writer="dummyItemWriter" commit-interval="5" />
I am using Spring batch 2.1.5
Please look at the above Code. Here i am having 2 steps
1. To generate the file by fetching the data from tables.
2. FTP the generated file to some destination.
In the step 2, i am using dummy reader & writer just because those are mandatory in a tasklet even though it is not serving any purpose.
I have added the logic to FTP the file in process method of the processor(FileFTP class).
Is there any way so that i can avoid the dummy reader & writer which are of no use?
Or is there any way where i can call a method in that step ?(i can add the whole code which is present in proces method of processor into that method)