feat: simple dev.sh script to launch development environment

This commit is contained in:
2025-11-08 12:49:03 +01:00
parent 5a7beabc9d
commit 8f39655da2
3 changed files with 25 additions and 2 deletions

24
dev.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
trap ctrl_c INT
function ctrl_c() {
stop
exit 0
}
function stop() {
kill %3
kill %2
kill %1
wait
}
npm run watch &
./gradlew classes --continuous &
./gradlew bootRun &
read -rp "Press Enter to stop"
stop

View File

@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.GetMapping;
public class HomeController { public class HomeController {
@GetMapping("/") @GetMapping("/")
public String home(Model model) { public String home(Model model) {
model.addAttribute("message", "Hello Thymeleaf!"); model.addAttribute("message", "Hello Thymeleaf!xxx");
return "home"; return "home";
} }
} }

View File

@@ -7,7 +7,6 @@
</head> </head>
<body> <body>
<h1 class="bg-red-200" th:text="${message}">Placeholder message</h1> <h1 class="bg-red-200" th:text="${message}">Placeholder message</h1>
<p>Test x</p>
<p>Test 2</p> <p>Test 2</p>
</body> </body>
</html> </html>