Introducing Batch User Guide Samples
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
= 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 Docker Images for the project
|
||||
```
|
||||
$ ./mvnw clean package jib:dockerBuild
|
||||
```
|
||||
|
||||
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 MySql
|
||||
```
|
||||
$ java -jar target/billsetuptask-1.0.0.BUILD-SNAPSHOT.jar --spring.datasource.url=jdbc:mysql://localhost:3306/<your database>?useSSL=false --spring.datasource.username=<user> --spring.datasource.password=<password> --spring.datasource.driverClassName=com.mysql.jdbc.Driver
|
||||
```
|
||||
|
||||
=== To execute billrun locally
|
||||
|
||||
Assuming you are using MySql, this app will load data from the usageinfo.txt file found in the classpath (included in the jar).
|
||||
```
|
||||
$ java -jar target/billrun-1.0.0.BUILD-SNAPSHOT.jar --spring.datasource.url=jdbc:mysql://localhost:3306/<yourdatabase>?useSSL=false --spring.datasource.username=<your user> --spring.datasource.password=<your password> --spring.datasource.driverClassName=com.mysql.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>`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user