An open API service indexing awesome lists of open source software.

https://github.com/showpune/spring-cloud-task-edu-samples


https://github.com/showpune/spring-cloud-task-edu-samples

Last synced: over 1 year ago
JSON representation

Awesome Lists containing this project

README

          

= 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 clean package jib:dockerBuild
```

NOTE: You can modify the docker org and version by applying the following: `-Ddocker.org= -Ddocker.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/?useSSL=false --spring.datasource.username= --spring.datasource.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/?useSSL=false --spring.datasource.username= --spring.datasource.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://`