From 0d4fcd1f7066cf8dca5333c39179659e65915e78 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 25 Feb 2022 00:33:35 +0330 Subject: updates --- .../com/terminaldweller/main/MainApplication.java | 25 ++++++++++++++++++++++ src/main/java/hello/Greeter.java | 6 ------ src/main/java/hello/HelloWorld.java | 8 ------- 3 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 src/main/java/com/terminaldweller/main/MainApplication.java delete mode 100644 src/main/java/hello/Greeter.java delete mode 100644 src/main/java/hello/HelloWorld.java (limited to 'src') diff --git a/src/main/java/com/terminaldweller/main/MainApplication.java b/src/main/java/com/terminaldweller/main/MainApplication.java new file mode 100644 index 0000000..3738769 --- /dev/null +++ b/src/main/java/com/terminaldweller/main/MainApplication.java @@ -0,0 +1,25 @@ +package com.terminaldweller.main; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** The main class. */ +@SpringBootApplication +@RestController +public class MainApplication { + @RequestMapping("/") + public String home() { + return "Hello Docker World"; + } + + /** + * just a dummy main. + * + * @param args just the argv + */ + public static void main(String[] args) { + SpringApplication.run(MainApplication.class, args); + } +} diff --git a/src/main/java/hello/Greeter.java b/src/main/java/hello/Greeter.java deleted file mode 100644 index 668f8fe..0000000 --- a/src/main/java/hello/Greeter.java +++ /dev/null @@ -1,6 +0,0 @@ -package hello; -public class Greeter { - public String sayHello() { - return "Hello World!"; - } -} diff --git a/src/main/java/hello/HelloWorld.java b/src/main/java/hello/HelloWorld.java deleted file mode 100644 index 0f6004e..0000000 --- a/src/main/java/hello/HelloWorld.java +++ /dev/null @@ -1,8 +0,0 @@ -package hello; - -public class HelloWorld { - public static void main(String [] args) { - Greeter greeter = new Greeter(); - System.out.println(greeter.sayHello()); - } -} -- cgit v1.2.3