From 087a13b6cbeae4f2d8389a1293f21b8022e49392 Mon Sep 17 00:00:00 2001 From: Claas Date: Wed, 8 Apr 2026 14:34:25 +0000 Subject: [PATCH] Get hello world to work Remove accidentally tracked files --- README.md | 5 +++++ src/main/java/dev/claas/flat/FlatApplication.java | 9 +++++++++ target/classes/application.properties | 1 - .../classes/dev/claas/flat/FlatApplication.class | Bin 729 -> 0 bytes .../dev/claas/flat/FlatApplicationTests.class | Bin 527 -> 0 bytes 5 files changed, 14 insertions(+), 1 deletion(-) delete mode 100644 target/classes/application.properties delete mode 100644 target/classes/dev/claas/flat/FlatApplication.class delete mode 100644 target/test-classes/dev/claas/flat/FlatApplicationTests.class diff --git a/README.md b/README.md index 0d4d7fd..bf74265 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ # Java dev container A dev container template/base repository for univerisity java projects to keep them isolated from my machine. + +# Run +```bash +mvn spring-boot:run +``` \ No newline at end of file diff --git a/src/main/java/dev/claas/flat/FlatApplication.java b/src/main/java/dev/claas/flat/FlatApplication.java index d925188..e141420 100644 --- a/src/main/java/dev/claas/flat/FlatApplication.java +++ b/src/main/java/dev/claas/flat/FlatApplication.java @@ -2,12 +2,21 @@ package dev.claas.flat; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; @SpringBootApplication +@RestController public class FlatApplication { public static void main(String[] args) { SpringApplication.run(FlatApplication.class, args); } + @GetMapping("/hello") + public String hello(@RequestParam(value = "name", defaultValue = "World") String name) { + return String.format("Hello %s!", name); + } + } diff --git a/target/classes/application.properties b/target/classes/application.properties deleted file mode 100644 index 5963a6a..0000000 --- a/target/classes/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=flat diff --git a/target/classes/dev/claas/flat/FlatApplication.class b/target/classes/dev/claas/flat/FlatApplication.class deleted file mode 100644 index f685f51bc1d9e3b0c775ce03912a04b12bdb9bba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 729 zcmX^0Z`VEs1_oCKSuO@924;2!79Ivx1~x_pfvm)`ME#t^ymWp4q^#8B5=I6#o6Nk- z5<5l)W)00Sb_Nbc2Dy~fGX3P7#KdC#w4B5eeYc#%632pqoXq6JlFa-(E(R_JZgvJ9 z9tK_pK1K$u{GxRI;)0^gy!5o9#N5>K{Gx3Ar2PC6{a~;ll1@ej=AzO(MusE}AA~!c za}tY-t)r1df=fV#S!?=WGdVdwuOzjiMBh0-FD)~@v?wttCl$#GXNa^lBLjgOE>ta$-(cVo@fD4;5r7$;d2bWKi(I?{|>7xrv#1j0|EL z*qj{3$iR|VlwQopAdE$tkwL&WwIm}yB_I(LQYEQH#f%JG!TF^{$*FFcIjM{cB4}Z) z2MQ-f2Fak(ypqh^)UeFrOpt%`^72c-aZ$|3V23rBz!8vGT9Tg(4X0FSbU5YbBS)q+ zgCYYv0}}%XFflNKQV9bi13v=;gFXWz10w?i1FP0{2F8sH3=B*R0t^fcY+yll20;b} z1|Be*l|hI>n1O+TlR<<*lz|DX*^B{X7y|=`5WCh62F`GVeo%sBVBlh4XW&LMgM&eg cL7ahsK>}nUBZC;&I!Q1o#UKr}R)&EA00|Xr#|nj|)_=z+q7k--dXPH{m|W?p()QDSat zd45s0eo}sZiGE3Hafv?EMf$;D6;Ap2C14vE6d2eUm>56+M6xolF)%W4GB7acGcYnR zGB7Z(YHep=+{nPdz{J4CzyOwJU|?t9W?*38fhb_$Vc-SnXW(OCV_*Vn)@EP;%VB8b aM$*U#)yNMuRsd{?Aea