我想用Spring Batch读取一个大的文本文件。我想使用Spring Batch提供的Partition逻辑。已经可用的分割器并不能解决我的问题。我想使用分区通过FlatFileReader读取文件。
请帮帮忙。
发布于 2013-11-25 18:36:24
您可以根据需要配置ThreadPoolTaskExecutor并调整各种属性
<bean name="batchTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor" >
<property name="maxPoolSize" value="6"/>
<property name="corePoolSize" value="4"/>
<property name="threadNamePrefix" value="batchitem"/>
<property name="threadGroupName" value="BATCH"/>
</bean>然后,当您在将执行实际块处理的步骤中配置微线程时,为配置的taskExecutor添加属性。例如
<batch:tasklet task-executor="batchTaskExecutor" transaction-manager="transactionManager" allow-start-if-complete="true">https://stackoverflow.com/questions/20189726
复制相似问题