该
SimpleJobBuilder配置通过Java配置分裂提供设施。以下是从
FlowJobBuilderTests(https://github.com/spring-
projects/spring-batch/blob/master/spring-batch-
core/src/test/java/org/springframework/batch/core/job/ builder /
FlowJobBuilderTests.java)。显然,您需要对此进行分解,但这应该可以说明总体思路。
// Create each flowFlow flow = new FlowBuilder<Flow>("subflow").from(step1).end();// Create the jobSimpleJobBuilder builder = new JobBuilder("flow").repository(jobRepository).start(step2);// Create split providing an async task executor so the flows are executed in parallelbuilder.split(new SimpleAsyncTaskExecutor()).add(flow).end();// Build the job and execute itbuilder.preventRestart().build().execute(execution);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)