Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.9 KB

File metadata and controls

53 lines (33 loc) · 1.9 KB

spring-batch-partition

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


Technologies Used

  • Java Development Kit (JDK) 17
  • Gradle 7.6
  • Spring Batch 3.0.1
  • QueryDSL 5.0.0
  • H2 2.1.214

Workflow

image

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.


ERD

image

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.


Entity

entity

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.


Getting Started

  1. Build the project using Gradle:
./gradlew build
  1. Run the Spring Boot application:
./gradlew bootRun