Add sample job based on PetClinic application

Signed-off-by: Mahmoud Ben Hassine <mbenhassine@vmware.com>
This commit is contained in:
Mahmoud Ben Hassine
2025-01-07 12:07:32 +01:00
parent aa8fb75f1c
commit 90e7e9fefa
7 changed files with 260 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ The IO Sample Job has a number of special instances that show different IO featu
| [multiResource Sample](#multiresource-input-output-job) | x | | | | | | | x | | x | | x |
| [XML Input Output Sample](#xml-input-output) | | | x | | | | | | | | | |
| [MongoDB sample](#mongodb-sample) | | | | | x | | | | x | | | |
| [PetClinic sample](#petclinic-sample) | | | | | x | x | | | | | | |
### Common Sample Source Structures
@@ -615,6 +616,16 @@ $>docker run --name mongodb --rm -d -p 27017:27017 mongo
Once MongoDB is up and running, run the `org.springframework.batch.samples.mongodb.MongoDBSampleApp`
class without any argument to start the sample.
### PetClinic sample
This sample uses the [PetClinic Spring application](https://github.com/spring-projects/spring-petclinic) to show how to use
Spring Batch to export data from a relational database table to a flat file.
The job in this sample is a single-step job that exports data from the `owners` table
to a flat file named `owners.csv`.
[PetClinic Sample](src/main/java/org/springframework/batch/samples/petclinic/README.md)
### Adhoc Loop and JMX Sample
This job is simply an infinite loop. It runs forever so it is