This is in continuation of my previous question. As the original question is closed
As per accepted answer, tasklet can be used , I have also tried implementing custom item writer in a chunk oriented step which uses jackson / JsonFileItemWriter, can we use this or does it have any performance impact ?
public void write(final List<? extends Person> persons) throws Exception {
for (Person person: persons) {
objectMapper.writeValue(new File("D:/cp/dataTwo.json"), person);
}
}
Question 1 : "Is the above approach recommended ?"
Question 2 : "Can we generate file in item processor itself and use no-op item writer ?"
Can some one please help ?