Skip to content

First Spring Batch project connecting to a database using MySQL

Notifications You must be signed in to change notification settings

rudiantoni/spring-batch-database

Repository files navigation

spring-batch-database

  • Basic working structure without single responsibility, using job, step and tasklet.
  • First project using a database (MySQL) for batch metadata persintence.
  • Dockerized project: both application and database runs in separate containers.
  • Automation oriented: most settings are done via shell scripts.

Requirements

Running

  • Run the file deploy.sh with: sh deploy.sh.
    • It uses the following command line argument(s):
      • name
  • 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.

Stopping

  • Run the file stop.sh with: sh stop.sh to fully stop and remove the application containers.
    • You don't need to stop the application if you want to run it again.

If you want to change the name in the message, you can change the JOB_PARAMETER_NAME variable value inside the file docker/environment.env.

Log image with working example:

About

First Spring Batch project connecting to a database using MySQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published