I have a requirement to implement in Spring batch,I need to read from a file and from a DB ,the data needs to be processed and written to an email
I have gone through the spring batch documentation but was unable to find a CHUNKtasklet which would read data from multiple readers
SO essentially I have to read from 2 different sources of data(one from file and another from DB,each will need to have its own mapper)
Regards Tar
I see two options depending on how the data is structured:
ItemReader that delegates to a other readers (ones Spring Batch provides or otherwise) and provides the logic to assemble a single object based on the results of those delegated ItemReaders.ItemReader to provide the base information (say from a database) and use and ItemProcessor to enrich the item (say reading from a file).Either of the above are normal ways to handle this type of input scenario.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With