Files
spring-cloud-dataflow-samples/dataflow-website/batch-developer-guides/batch/batchsamples
Glenn Renfro 7c11592f74 Updated versions and replaced mysql docs with mariadb
Updated Readme to replace the use of mysql with mariadb.
Updated instructions to use boot image builder instead of Jib.
Updated vesions
2022-01-06 13:40:20 -05:00
..
2020-07-21 11:17:31 -04:00
2019-05-02 16:51:30 -04:00
2019-04-19 14:54:45 -04:00
2019-04-19 14:54:45 -04:00

= Task EDU Samples

This is the foundation project from which Spring Cloud Data Flow's Task Edu materials will be derived.

== Overview
This project contains 2 apps:

* *billsetuptask* - is a Spring Cloud Task app that will create the table required for the billrun application.
* *billrun* - is a Spring Cloud Task/Spring Batch app that will read JSON files containing simple user cellphone usage data from a specified directory, price it and place the results in another table.

== Build the project
From the root project execute the following:
```
$ ./mvnw clean package
```

== Build the project zip file
```
$./mvnw clean package -Pdist
```

== Build the Docker Images for the project
```
$ ./mvnw spring-boot:build-image
```

NOTE: You can modify the docker org and version by applying the following: `-Ddocker.org=<your org> -Ddocker.version=<your version>`

== Executing the jars

=== To execute billsetuptask locally

Assuming you are using Mariadb
```
$ java -jar target/billsetuptask-0.0.1-SNAPSHOT.jar --spring.datasource.url=jdbc:mariadb://localhost:3306/<your database>?useSSL=false --spring.datasource.username=<user> --spring.datasource.password=<password> --spring.datasource.driverClassName=org.mariadb.jdbc.Driver
```

=== To execute billrun locally

Assuming you are using Mariadb, this app will load data from the usageinfo.txt file found in the classpath (included in the jar).
```
$ java -jar target/billrun-0.0.1-SNAPSHOT.jar --spring.datasource.url=--spring.datasource.url=jdbc:mariadb://localhost:3306/<your database>?useSSL=false --spring.datasource.username=<user> --spring.datasource.password=<password> --spring.datasource.driverClassName=org.mariadb.jdbc.Driver
```
If you wish to read a directory containing the data you can use the following command line argument:
`--usage.file.name=file://<location of json file to upload>`