问题描述
假设我有以下流程, 开始->Step1->Step2->Step3->Step2->End
我已经为每个步骤创建了 tasklet,并按上述方式配置了一个作业。 当作业被触发时,执行到 Step3 为止都很好,并无限循环。 那么有没有一种方法可以在 JobFlow 中多次执行步骤。
我使用的是 Spring Batch 4.2.1.RELEASE。
解决方法
你怎么写你的工作?我曾经在使用基于批处理的许多流程时遇到过这种问题。
你有没有尝试过这样的事情?
public class RowsSum {
public static void main(String[] args) {
int[][] nums = new int[5][3]; //declaring a 2D array of type int
int num = 2;
for (int i = 0; i < nums.length; i++) {
for (int j = 0; j < nums[i].length; j++) {
nums[i][j] = (int) Math.pow(num,((i*nums[i].length)+j+1)); //code A
System.out.print(nums[i][j] + "\t");
}//closing inner loop
System.out.println("");
}// closing nested for loop
}// closing main method
}//closing class