Grouping/summarizing spring-batch records

淺唱寂寞╮ 提交于 2019-12-01 12:55:14

Write a job with two steps:

  1. Read every record and from input then, in your own ItemWriter.write(), update a summary table
  2. Dump your summary table to text file (or webservice)

You can also try to reach the goal writing a single SQL statement using aggregate function like SUM() and COUNT() then, with a single-step job, read every record generated from custom SQL and write directly to you text file (or webservice).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!