Dummy code to test the functionality of Spring batch using chunks reading from a db and printing the values.
You need to setup the postgres db. You can start the service with docker compose:
docker compose up -d
Then you should enter the db with:
docker exec -it postgres_batch bash
and login with the batch user:
psql -U batch
you can change the db with:
\c batch
At this point you should apply the changes from the file src/main/resources/db/version_1.sql
Use maven to compile with:
mvn clean install
java -jar target/batch*.jar