In the spring batch code, I am reading chunk of 100 records. for each record in the chunk I am checking whether the record exists in the DB or not. If the record exists in the DB I am not inserting it.
For the first time, if I have a duplicate record in the chunk of 100, the spring batch processor is not able to identify that this record is duplicate as there is no data in DB and the processor will select all 100 first and then perform the insert.
Is there a way I can perform a check within the chunk of 100 first and then check the DB and after these two I insert into the DB?