A template for quickly building highly configurable spring batch based jobs
I've noticed an abundance of xml-based starters/examples but fewer class-based jobs. This is an opinionated collection of patterns that I've found handy.
The starter is divided into the following packages:
com.batch.Application is the main class of the application, as in a normal spring boot app.
Configuration classes for necessary batch components are scanned via Spring accordingly/
com.batch.config.* contains classes that configure jobs,steps and tasks:
dbcontains datasource configuration. This could be a JDBC connection, MongoDB, etcreaderscontains configuration and custom reader instantiationswriterscontains configuration and custom writer instantiationsbatchconfigures the overall batch processing job
com.batch.custom contains custom reader/writer impls
com.batch.model contains model classes
com.batch.processor contains processor implementations
com.batch.notification contains custom listeners
The starter comes with a basic integration test that will run the sample job. This should be tailored to your specific use case.
mvn test👤 Sai Nimmagadda
- Website: s11a.com
- Github: @snimmagadda1
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2020 Sai Nimmagadda.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator
