目前我有一个Spring Integration-JDBC的实现,它轮询一个数据库表以查找记录,并将有效的记录发送给Spring Batch进行处理。我正在将另一个表监视器和另一个批处理作业添加到该项目中,但我不确定批处理需要哪些特殊任务,以及什么可以/应该被重用?
Spring Batch作业设置:
<bean id="jobOperator" class="org.springframework.batch.core.launch.support.SimpleJobOperator">
<property name="jobExplorer">
<bean class="org.springframework.batch.core.explore.support.JobExplorerFactoryBean">
<property name="dataSource" ref="dataSource" />
</bean>
</property>
<property name="jobRepository" ref="jobRepository" />
<property name="jobRegistry" ref="jobRegistry" />
<property name="jobLauncher" ref="jobLauncher" />
</bean>
<bean id="jobRegistry" class="org.springframework.batch.core.configuration.support.MapJobRegistry"/>
<bean id="jobRepository" class="org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean">
<property name="transactionManager" ref="transactionManager"/>
</bean>
<bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher">
<property name="jobRepository" ref="jobRepository" />
</bean>
我需要为所有这些内容创建jobOperator2、JobLauncher2等吗?