附录在这里 http://docs.spring.io/spring-batch/trunk/reference/html/listOfReadersAndWriters.html列出读者AggregateItemReader
但我无法在任何 Spring Batch jar 文件中找到它。我正在使用 Spring Batch 和 Spring Boot,版本为 3.0.7。
API Doc http://docs.spring.io/spring-batch/apidocs/org/springframework/batch/sample/domain/multiline/AggregateItemReader.html在样品包中注明。
目前,我正在使用JdbcPagingItemReader
在我的项目中,但我希望读者返回List
or Collection
处理器的对象而不是单个对象。这是需要的,这样我就可以批量处理这些对象,而不是一个接一个地处理。
分页要求是强制性的,所以我使用JdbcPagingItemReader
通过阅读描述,看起来AggregateItemReader
是候选者,但找不到其实现。
有任何想法吗?还有其他选择吗?
包含 AggregateItemReader 类的包 org.springframework.batch.sample.domain.multiline 似乎位于 spring-batch-samples 工件中;这也应该与 spring-batch-core 分开导入到您的项目中。例如。在 maven pom.xml 中,以下依赖项解决了该问题
<dependency>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-samples</artifactId>
<version>3.0.0.M3</version>
</dependency>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)