Spring Batch - Validate Header Lines in input csv file and skip the file if it invalidates
问题 I have a simple job as below: <batch:step id="step"> <batch:tasklet> <batch:chunk reader="itemReader" processor="itemProcessor" writer="itemWriter" commit- interval="5000" /> </batch:tasklet> </batch:step> itemReader is as below: <bean id="itemReader" class="org.springframework.batch.item.file.FlatFileItemReader" scope="step"> <property name="linesToSkip" value="1"></property> <property name="skippedLinesCallback" ref="skippedLinesCallback" ></property> <property name="lineMapper"> <bean