Batch Samples using Spring Batch
Spring Batch follows the traditional batch architecture where a job repository does the work of scheduling and interacting with the job.
A job can have more than one step. And every step typically follows the sequence of reading data, processing it and writing it.
- Java 17
- GraalVM 22.3+
- Kotlin
- Maven 3.x
- Kafka
You can install the dependencies and build by typing the following command
mvn clean install
To compile as native, run the following goal:
$ mvn native:compile -Pnative
Then, you can run the batch as follows:
$ target/spring-batch-samples
You can run batchlication's tests by typing the following command
mvn verify
You can test code quality locally via sonarqube by typing the following command
mvn -Psonar compile initialize sonar:sonar
Detekt a static code analysis tool for the Kotlin programming language
You can run detekt by typing the following command
mvn antrun:run@detekt
You can check for security vulnerabilities by typing the following command
$ mvn -Powasp dependency-check:check
You can see the generated report at target/dependency-check-report.html
You can also fully dockerize the sample applications. To achieve this, first build a docker image of your app. The docker image of sample app can be built as follows:
mvn -Pjib verify jib:dockerBuild
to build native image
mvn -Pnative spring-boot:build-image
- Docker
- Docker Compose
You can deploy batch by running the following bash command
sudo chmod +x deploy.sh
./deploy.sh -d
You can uninstall batch the following bash command
./deploy.sh -d -r
- Kubernetes
- Helm
You can deploy batch by running the following bash command
sudo chmod +x deploy.sh
./deploy.sh -k
You can uninstall batch the following bash command
./deploy.sh -k -r
You can upgrade the batch (if you have made any changes to the generated manifests) by running the following bash command
./deploy.sh -u
- Java 17
- Kotlin
- GraalVM
- Upx
- Docker
- Docker Compose
- Kubernetes
- Helm
- Sonarqube
- Snyk
- CircleCI
- Detekt
- H2
- Kafka
- Spring Boot 3.x
- Spring Boot Batch
- Spring Batch Integration
- Spring Boot Jpa
- Spring Kafka
- Mapstruct