From 7c29cd347f7a45aabd8a9201cda3744038bc2b9d Mon Sep 17 00:00:00 2001 From: Divit Bui Date: Thu, 13 Dec 2018 14:51:26 +0000 Subject: [PATCH 1/5] Add application.properties file Server will now listen to port 8888 and logging level can be altered. --- .../src/main/resources/application.properties | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 com.divit.spring-boot-simple-rest-api/src/main/resources/application.properties diff --git a/com.divit.spring-boot-simple-rest-api/src/main/resources/application.properties b/com.divit.spring-boot-simple-rest-api/src/main/resources/application.properties new file mode 100644 index 0000000..7bc2658 --- /dev/null +++ b/com.divit.spring-boot-simple-rest-api/src/main/resources/application.properties @@ -0,0 +1,2 @@ +server.port=8888 +logging.level.root=INFO \ No newline at end of file From 441ab63cb3f18901bd8c3b24e13f61622317018f Mon Sep 17 00:00:00 2001 From: Divit Bui Date: Thu, 13 Dec 2018 14:52:02 +0000 Subject: [PATCH 2/5] Add DockerFile Can now be built via docker --- com.divit.spring-boot-simple-rest-api/DockerFile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 com.divit.spring-boot-simple-rest-api/DockerFile diff --git a/com.divit.spring-boot-simple-rest-api/DockerFile b/com.divit.spring-boot-simple-rest-api/DockerFile new file mode 100644 index 0000000..a565d17 --- /dev/null +++ b/com.divit.spring-boot-simple-rest-api/DockerFile @@ -0,0 +1,5 @@ +FROM openjdk:8-jdk-alpine +VOLUME /tmp +COPY /target/spring-boot-divit-0.0.1-SNAPSHOT.jar app.jar +EXPOSE 8888 +ENTRYPOINT ["java","-jar","/app.jar"] \ No newline at end of file From 189c111e1c4e99e33727e89095bc07df95e59776 Mon Sep 17 00:00:00 2001 From: Divit Bui Date: Thu, 13 Dec 2018 14:53:09 +0000 Subject: [PATCH 3/5] Change name of jar --- com.divit.spring-boot-simple-rest-api/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/com.divit.spring-boot-simple-rest-api/pom.xml b/com.divit.spring-boot-simple-rest-api/pom.xml index 37fc3ff..234f8b4 100644 --- a/com.divit.spring-boot-simple-rest-api/pom.xml +++ b/com.divit.spring-boot-simple-rest-api/pom.xml @@ -34,5 +34,6 @@ + spring-boot-divit-${version} \ No newline at end of file From e762c3ca8539743edce242ada4ce45c38fd1460c Mon Sep 17 00:00:00 2001 From: Divit Bui Date: Thu, 13 Dec 2018 14:54:46 +0000 Subject: [PATCH 4/5] Update name of jar --- com.divit.spring-boot-simple-rest-api/DockerFile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.divit.spring-boot-simple-rest-api/DockerFile b/com.divit.spring-boot-simple-rest-api/DockerFile index a565d17..7b72afb 100644 --- a/com.divit.spring-boot-simple-rest-api/DockerFile +++ b/com.divit.spring-boot-simple-rest-api/DockerFile @@ -1,5 +1,5 @@ FROM openjdk:8-jdk-alpine VOLUME /tmp -COPY /target/spring-boot-divit-0.0.1-SNAPSHOT.jar app.jar +COPY /target/spring-boot-divit.jar app.jar EXPOSE 8888 ENTRYPOINT ["java","-jar","/app.jar"] \ No newline at end of file From baac283225bf7b1e70808aaacedfdfafceeab46a Mon Sep 17 00:00:00 2001 From: Divit Bui Date: Thu, 13 Dec 2018 14:55:11 +0000 Subject: [PATCH 5/5] Update name of jar --- com.divit.spring-boot-simple-rest-api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.divit.spring-boot-simple-rest-api/pom.xml b/com.divit.spring-boot-simple-rest-api/pom.xml index 234f8b4..fee5916 100644 --- a/com.divit.spring-boot-simple-rest-api/pom.xml +++ b/com.divit.spring-boot-simple-rest-api/pom.xml @@ -34,6 +34,6 @@ - spring-boot-divit-${version} + spring-boot-divit \ No newline at end of file