+
+ true
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/Build_and_Run_on_Docker.xml b/.idea/runConfigurations/Build_and_Run_on_Docker.xml
new file mode 100644
index 0000000..d18cb20
--- /dev/null
+++ b/.idea/runConfigurations/Build_and_Run_on_Docker.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/PwgenApplication.xml b/.idea/runConfigurations/Run_PwgenApplication.xml
similarity index 71%
rename from .idea/runConfigurations/PwgenApplication.xml
rename to .idea/runConfigurations/Run_PwgenApplication.xml
index 06ae90c..0d29989 100644
--- a/.idea/runConfigurations/PwgenApplication.xml
+++ b/.idea/runConfigurations/Run_PwgenApplication.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..4906728
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,10 @@
+FROM gradle:jdk11 AS build
+WORKDIR /root
+COPY . .
+RUN ["gradle", "bootJar"]
+
+FROM openjdk:13-jdk-alpine
+WORKDIR /root
+COPY --from=build /root/build/libs/*.jar app.jar
+EXPOSE 80
+ENTRYPOINT ["java","-jar","app.jar"]
\ No newline at end of file
diff --git a/src/main/java/de/icaotix/pwgen/HelloController.java b/src/main/java/de/icaotix/controller/DefaultController.java
similarity index 59%
rename from src/main/java/de/icaotix/pwgen/HelloController.java
rename to src/main/java/de/icaotix/controller/DefaultController.java
index 5406e66..c52f040 100644
--- a/src/main/java/de/icaotix/pwgen/HelloController.java
+++ b/src/main/java/de/icaotix/controller/DefaultController.java
@@ -1,14 +1,14 @@
-package de.icaotix.pwgen;
+package de.icaotix.controller;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
@RestController
-public class HelloController {
+public class DefaultController {
@RequestMapping("/")
public String index() {
- return "Greetings from Spring Boot!";
+ return "Greetings from Spring Boot, also from a Docker Container!";
}
}
\ No newline at end of file
diff --git a/src/main/java/de/icaotix/pwgen/PwgenApplication.java b/src/main/java/de/icaotix/pwgen/PwgenApplication.java
index 08af5eb..8d7838e 100644
--- a/src/main/java/de/icaotix/pwgen/PwgenApplication.java
+++ b/src/main/java/de/icaotix/pwgen/PwgenApplication.java
@@ -2,8 +2,9 @@ package de.icaotix.pwgen;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
-@SpringBootApplication
+@SpringBootApplication(scanBasePackages = {"de.icaotix"})
public class PwgenApplication {
public static void main(String[] args) {