Skip to content

rudiantoni/spring-batch-xml-reader

Repository files navigation

spring-batch-xml-reader

  • Example project that uses an xml file as data source.
  • Using a single PostgreSQL database for metadata 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:
    • DATA_SOURCE_FILE: xml data source file full path from inside the container: Default /opt/app/files/registers.xml
      • Note: If you change the /opt/app/files portion in the environment variables, you will need to change the ./docker/docker-compose.yml file in order to share the right volume.
      • Note: Currently the data source file is located at: ./docker/files. It's mounted as a volume, sharing its contents with the 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

Spring Batch application using a xml file as data source.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published