-
Notifications
You must be signed in to change notification settings - Fork 393
Expand file tree
/
Copy pathrun-sample.sh
More file actions
executable file
·48 lines (45 loc) · 1.39 KB
/
run-sample.sh
File metadata and controls
executable file
·48 lines (45 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
set -euo pipefail
echo "Spring Shell Samples"
echo "===================="
echo ""
echo "Select a sample to run:"
echo ""
echo " 1) hello-world — Simple greeting shell application"
echo " 2) non-interactive — Non-interactive sample (runs 'hi' and exits)"
echo " 3) petclinic — Spring PetClinic shell application"
echo " 4) secure-input — Secure input / password prompt sample"
echo " 5) spring-boot — Spring Boot-based shell application"
echo ""
read -rp "Enter your choice [1-5]: " choice
case "$choice" in
1)
echo ""
echo "Running: hello-world"
java -jar spring-shell-samples/spring-shell-sample-hello-world/target/hello-world.jar
;;
2)
echo ""
echo "Running: non-interactive"
java -jar spring-shell-samples/spring-shell-sample-non-interactive/target/non-interactive.jar hi
;;
3)
echo ""
echo "Running: petclinic"
java -jar spring-shell-samples/spring-shell-sample-petclinic/target/petclinic.jar
;;
4)
echo ""
echo "Running: secure-input"
java -jar spring-shell-samples/spring-shell-sample-secure-input/target/secure-input.jar
;;
5)
echo ""
echo "Running: spring-boot"
java -jar spring-shell-samples/spring-shell-sample-spring-boot/target/hello-world-boot.jar
;;
*)
echo "Invalid choice: '$choice'. Please enter a number between 1 and 5." >&2
exit 1
;;
esac