Welcome to the Spring Batch project! This project demonstrates an efficient way to process data using Spring Batch Partitioner. For more detailed information about this GitHub repository, please refer to my post
- Java Development Kit (JDK) 17
- Gradle 7.6
- Spring Batch 3.0.1
- QueryDSL 5.0.0
- H2 2.1.214
We'll leverage Spring Batch partitioning to segment data based on its type. When Spring Batch partitioning operates with a single thread in a local environment, we can utilize it as if it were a 'for-each' loop. This approach allows the code to remain consistent while being tailored to handle different types.
The payment_history
table served to manage shared fields across all payment gateways, abstracting common elements. Additionally, each payment gateway had its dedicated table to store specific fields.
The related table can be discerned by referencing the payment_gateway_type
column.

The BasePaymentGatewayHistoryEntity
serves as the parent class for each payment gateway history entity, providing a set of common fields for its child entities. Each payment gateway history entity is designed to accommodate fields specific to individual payment gateways.
- Build the project using Gradle:
./gradlew build
- Run the Spring Boot application:
./gradlew bootRun