Spring Batch app that reads file from blob storage, decrypts file, performs line transform, encrypts & writes back to blob storage.
- custom ItemReaders & ItemWriters along with StepExecutionListeners
- Testcontainer + docker-compose to setup infra for JUnits
- Trigger batch job using api + asyncJobLauncher
- Spring Batch job testing using syncJobLauncher
- devcontainer - Unix + Java + Docker to test custom encryption libs
- Format Code
./mvnw com.spotify.fmt:fmt-maven-plugin:format
- Setup docker compose
rm -rf azurite; docker compose kill; docker compose up -d
- run spring boot api
mvn spring-boot:run -Dspring-boot.run.profiles=local
- upload file to docker azure blob
## only available for local profile curl --location 'http://localhost:8080/blob/upload' \ --header 'Content-Type: application/json' \ --data '{ "fileType": "FIXED", "sourceFilePath": "src/main/resources/data/input/fixed_length.txt", "destinationFilePath": "test-data/fixed_length.txt" }'
- trigger job
curl --location 'http://localhost:8080/job' \ --header 'Content-Type: application/json' \ --data '{ "fileType": "FIXED", "sourceFilePath": "test-data/fixed_length.txt", "destinationFilePath": "test-data/fixed_length_processed.txt" }'
## only available for local profile # list blobs in a container curl --location 'http://localhost:8080/blob/list/test-data'