Skip to content

rudiantoni/spring-batch-jdbc-cursor-reader

Repository files navigation

spring-batch-jdbc-cursor-reader

  • Reading data from a database with JdbcCursorReader reader.
  • Using double PostgreSQL database for metadata and application data persisting.
  • Dockerized project: both application and database runs in separate containers.
  • Automation oriented: most settings are done via shell scripts and environment variables.

Requirements

Running

  • Linux: Run the file deploy.sh with: sh deploy.sh.
  • Windows: Run the file deploy.bat with: deploy.bat in an command prompt window with administrator privileges.
  • For didatic purposes (like connecting and checking the database, checking logs, etc), the application doesn't clean the created containers automatically when finishes it's execution, so just follow the Stopping section instructions in order to fully stop and clean the application containers.

Other settings

  • Between various other settings available in the file environment.env, the ones that you may be interested are the following:
    • DB_INIT_FILES: database initialize files folder, as soon as the database starts, it will run any .sh and .sql files inside this root folder.
      • Note: Currently the database initialize files folder at: ./docker/db_init_files. It's mounted as a volume, sharing its contents with the database container.

Stopping

Linux

  • Linux: Run the file stop.sh with: sh stop.sh
  • Windows: Run the file stop.bat with: stop.bat in an command prompt window with administrator privileges.
    • This is intendedd to fully stop and remove the application containers.
    • You don't need to stop the application if you want to run it again.

Log image with working example:

About

Reading data from a database with JdbcCursorReader reader.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published