This is a Java Spring Batch project that allows you to import CSV files into a database. It provides two different approaches for importing: multi-threaded and single-threaded.
The project utilizes the following technologies and frameworks:
- Java
- Spring Boot
- Spring Batch
- Spring Batch Integration
- Maven (for build and dependency management)
- PostgreSQL
- Docker
Before running this project, make sure you have the following prerequisites installed:
- Java JDK (version 17 or higher)
- Maven (for building and managing dependencies)
- Docker
- Clone the repository:
git clone https://github.com/uberlannunes/spring-batch-csv-to-db.git- Navigate to the project directory:
cd spring-batch-csv-to-db- Execute docker compose command to setup the Database
docker compose up -d- Run the Application
./mvnw spring-boot:runNOTE: By default the project runs with Multi Thread approach, to switch to Single Thread follow the steps:
- Comment the @Configuration on ImportCsvToDbMultiThreadJob.java
- Uncomment the @Configuration on ImportCsvToDbSingleThreadJob.java