Spring Batch is a framework for batch processing that deals with large amounts of data. Wagby can call classes created for Spring Batch.

Spring Batch is an open source framework with the following features.

  • Job flow can be defined.
  • It is possible to control suspension and reexecution of jobs.
  • Control by conditional branching can be performed.
  • The job status (state) is managed in a centralized manner in the database.

In other words, it is suitable for cases where it is necessary to control redo processing at error and conditional branching in batch processing dealing with large amounts of data.

The developer learns the Spring Batch framework and creates a batch program that conforms to that specification.For details of programmingOfficial sitePlease refer to.

Cooperation with Wagby

Wagby ships Spring Batch framework.You can search and display the job status of Spring Batch from Wagby's management processing menu.


Wagby after R 7.10 Spring Batch 3 Are bundled.Wagby before that Spring Batch 2 Are bundled.

By pressing the button, we prepared a sample that calls the Java program running on the Spring Batch framework.(The specific code will be explained later.)

Figure 3 Sample calling a batch program running with Spring Batch by pressing a button

When executed, a message is output to the console and the batch program is terminated.

Figure 4 Program executed

This sample retrieves Customer from the database using the CustomerService automatically generated by Wagby and displays it one by one on the screen.Details of the code are explained on the next page.

Check the management table

After executing the batch program developed to operate with the Spring Batch framework, you can check the job execution status from the "management processing> batch job" menu.

Figure 5 Management Processing Menu

When one batch program is executed, the result is stored in "Batch job instance".I will search for this.

Figure 6 Confirm batch job instance

The batch job instance ID is numbered by Spring Batch.

Figure 7 Batch job instance list

You can check "Batch job execution result" from the detail screen."Creation time" "start time" "end time" "status" "end code" is prepared."COMPLETED" means normal termination.

Figure 8 Batch job instance detail display

Furthermore, you can check "Batch job execution details" "Batch job execution parameter" "Batch step execution" information.

Fig. 9 Detailed display of batch job execution result (1)
Fig. 10 Detailed display of batch job execution result (2)

On the "Batch step execution" detail screen, you can check information such as commit count, read count, and write count.

Figure 11 Batch step execution detail screen