README.md 1.94 KB
Newer Older
Kutzner's avatar
Kutzner committed
1
# HelloREST
Kutzner's avatar
Kutzner committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
> **_INFO:_**  Demo project for Spring Boot and REST 

## Table of Contents
1. [Run Application (MAVEN)](#run-application-maven)
2. [Run Application (DOCKER)](#run-application-docker)
3. [How to use Application](#how-to-use-application)

## Run Application (MAVEN)
Clone Repository:
```sh
git clone https://transfer.hft-stuttgart.de/gitlab/kebidge/hello-rest.git
```
Build Application:
```sh
mvn clean package
```
Run Spring-Boot Application:
```sh
mvn spring-boot:run
```
Application starts on port 9999. Open in Browser:
```sh
localhost:8090
```

## Run Application (DOCKER)
Run Docker Image
```sh
docker run -p 8090:8090 kebidge/hello-rest:jib
```
Application starts on port `8090`. Open in Browser:
```sh
localhost:8090
```

### Image Details
Type: [Google Jib]\
Size: `302MB`\
Compressed Size: `133.38MB`\
OS/ARCH: `linux/amd64`

| Description | Size | Comment |
| ------ | ------ | ------ | 
| jib-maven-plugin:3.1.4  | 4.32kB | jvm arg files | 
| jib-maven-plugin:3.1.4  | 2.38kB | classes | 
| jib-maven-plugin:3.1.4  | 3.06kB | resources | 
| jib-maven-plugin:3.1.4  | 57.7MB | dependencies | 
| /bin/sh -c #(nop)  ENV JAVA_HOME=/opt/java/o… | 0B |  | 
| /bin/sh -c set -eux;     ARCH="$(dpkg --prin… | 128MB |  | 
| /bin/sh -c #(nop)  ENV JAVA_VERSION=jdk-11.0… | 0B |  | 
| /bin/sh -c apt-get update     && apt-get ins… | 43.2MB |  | 
| /bin/sh -c #(nop)  ENV LANG=en_US.UTF-8 LANG… | 0B |  | 
| /bin/sh -c #(nop)  CMD ["bash"] | 0B |  | 
| /bin/sh -c #(nop) ADD file:8d2f4a45a58b3f542… | 72.8MB |  | 

## How to use Application
> **_INFO:_**  There are 3 REST endpoints implemented 

### Initial Endpoint
```sh
localhost:8090
```
or
```sh
localhost:8090/
```
> **_OUTPUT:_**  Hello World!

### Kebidge Endpoint
```sh
localhost:8090/kebidge
```
> **_OUTPUT:_**  Hello Kebidge!

### Personal Endpoint
> **_INFO:_**  Set value via endpoint parameter, e.g. `HFT Stuttgart`
```sh
localhost:8090/hello/`HFT Stuttgart`
```
> **_OUTPUT:_**  Hello HFT Stuttgart!
Kutzner's avatar
Kutzner committed
82