我目前正在启动并运行Spring Integration-JDBC实现,它会轮询db表以获取记录,然后发送有效记录以供Spring Batch处理。我正在为项目添加一个额外的表监视器,还有一个额外的批处理作业,但是我不确定Batch的哪些章节必须是其他任务所特有的,以及什么可以/应该重复使用吗?
Spring Batch Job Setup:
<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,...吗?