Spring Batch comes with listeners. They intercept the job execution to perform certain tasks.
StepListener is a
super class for the following mentioned listeners:
SkipListener: One of the most common use cases for
SkipListeneris to log out a skipped item so that another batch process, or even human process, can be used to evaluate and fix the issue leading to the skip. Because there are many cases in which the original transaction may be rolled back, Spring Batch makes two guarantees:
skipmethod (depending on when the error happened) will only be called once per item.
SkipListenerwill always be called just before the transaction is committed. This is to ensure that any transactional ...