itemprocessor

Spring Batch: One reader, multiple processors and writers

无人久伴 提交于 2019-12-03 08:42:28
问题 In Spring batch I need to pass the items read by an ItemReader to two different processors and writer. What I'm trying to achieve is that... +---> ItemProcessor#1 ---> ItemWriter#1 | ItemReader ---> item ---+ | +---> ItemProcessor#2 ---> ItemWriter#2 This is needed because items written by ItemWriter#1 should be processed in a completely different way compared to the ones written by ItemWriter#2. Moreover, ItemReader reads item from a database, and the queries it executes are so computational

Spring Batch: One reader, multiple processors and writers

一曲冷凌霜 提交于 2019-12-02 22:28:41
In Spring batch I need to pass the items read by an ItemReader to two different processors and writer. What I'm trying to achieve is that... +---> ItemProcessor#1 ---> ItemWriter#1 | ItemReader ---> item ---+ | +---> ItemProcessor#2 ---> ItemWriter#2 This is needed because items written by ItemWriter#1 should be processed in a completely different way compared to the ones written by ItemWriter#2. Moreover, ItemReader reads item from a database, and the queries it executes are so computational expensive that executing the same query twice should be discarded. Any hint about how to achieve such