当前我正在为使用Spring集成和Spring批处理创建POC。我正在关注这个Spring Batch Integration。但我正在尝试使用注释和Spring引导来做到这一点,并且不想使用任何XML配置。任何人都可以请建议我如何从Spring批量集成中使用JobLaunchingGateway。请让我知道你是否需要更多细节。请找到我正在努力工作的下面的代码示例。使用批注的Spring集成和Spring批处理[Spring-Batch-Integration]
@Gateway(requestChannel = "outboundJobRequestChannel",replyChannel = "jobLaunchReplyChannel")
public JobExecution jobLauncher(Message<JobLaunchRequest> jobLaunchRequestMessage){
log.info("------ Inside the Gateway ------");
JobExecution jobExecution = new JobExecution();
// How to use the JobLaunchingGateway here in order to launch the job
return jobExecution;
}
我曾尝试这一个,但得到了下面的例外,产生的原因:org.springframework.beans.BeanInstantiationException:无法实例[org.springframework.batch.integration.launch.JobLaunchingGateway]:圆形参考涉及含有豆'integrationJobConfig' - 考虑将工厂方法声明为独立于其包含实例的静态方法。工厂方法'jobLaunchingGateway'抛出异常;嵌套的异常是java.lang.NoClassDefFoundError:org/springframework/integration/MessageHandlingException – sagar27
我相信有一些版本不匹配,所以我可能得到这一个。 – sagar27
这的确听起来像版本不匹配。你的答案不相关。这不是在这里如何工作... –