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
- Host: GitHub
- URL: https://github.com/showpune/spring-cloud-task-edu-samples
- Owner: showpune
- Created: 2021-09-12T08:13:14.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:27:51.000Z (over 2 years ago)
- Last Synced: 2025-01-24T10:47:08.900Z (over 1 year ago)
- Language: Java
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
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://`