Skip to content

mia-developer/spring-batch-partition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Type-Based Data Processing with Spring Batch Partitioning

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages