summaryrefslogtreecommitdiff
path: root/spring-boot/05-bank-rest-client/src/main/resources
diff options
context:
space:
mode:
authorKamal Wickramanayake <kamal@inbox.lk>2026-05-16 21:18:32 +0530
committerKamal Wickramanayake <kamal@inbox.lk>2026-05-16 21:18:32 +0530
commite51834c899ff20781295410961934eb06239385c (patch)
tree78f0058914063e37cbd6812d204e4f84efd0ab90 /spring-boot/05-bank-rest-client/src/main/resources
parentb1d598a2f02819bc127d0d3522dc7ac91b4dee65 (diff)
Added spring-boot sample applications
Diffstat (limited to 'spring-boot/05-bank-rest-client/src/main/resources')
-rw-r--r--spring-boot/05-bank-rest-client/src/main/resources/application.properties12
-rw-r--r--spring-boot/05-bank-rest-client/src/main/resources/templates/form.html17
-rw-r--r--spring-boot/05-bank-rest-client/src/main/resources/templates/index.html16
-rw-r--r--spring-boot/05-bank-rest-client/src/main/resources/templates/result.html15
4 files changed, 60 insertions, 0 deletions
diff --git a/spring-boot/05-bank-rest-client/src/main/resources/application.properties b/spring-boot/05-bank-rest-client/src/main/resources/application.properties
new file mode 100644
index 0000000..cf862c6
--- /dev/null
+++ b/spring-boot/05-bank-rest-client/src/main/resources/application.properties
@@ -0,0 +1,12 @@
+# Possible locations of this file:
+# (Properties defined in locations higher in the list override those defined in lower locations)
+#
+# A /config subdirectory of the current directory
+# The current directory
+# A classpath /config package
+# The classpath root
+#
+
+server.port = 8081
+
+rest.baseURL=http://localhost:8080 \ No newline at end of file
diff --git a/spring-boot/05-bank-rest-client/src/main/resources/templates/form.html b/spring-boot/05-bank-rest-client/src/main/resources/templates/form.html
new file mode 100644
index 0000000..7927b92
--- /dev/null
+++ b/spring-boot/05-bank-rest-client/src/main/resources/templates/form.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org">
+
+<head>
+ <title>Check Account Balance</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+
+<body>
+ <h1>Form</h1>
+ <form action="#" th:action="@{/acc}" th:object="${account}" method="post">
+ <p>Account number: <input type="text" th:field="*{accNo}" /></p>
+ <p><input type="submit" value="Submit" /> <input type="reset" value="Reset" /></p>
+ </form>
+</body>
+
+</html> \ No newline at end of file
diff --git a/spring-boot/05-bank-rest-client/src/main/resources/templates/index.html b/spring-boot/05-bank-rest-client/src/main/resources/templates/index.html
new file mode 100644
index 0000000..f30a2c0
--- /dev/null
+++ b/spring-boot/05-bank-rest-client/src/main/resources/templates/index.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org">
+
+<head>
+ <title>Check Account Balance</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+
+<body>
+
+Access <a href="/acc">/acc</a>
+
+</body>
+
+</html>
+
diff --git a/spring-boot/05-bank-rest-client/src/main/resources/templates/result.html b/spring-boot/05-bank-rest-client/src/main/resources/templates/result.html
new file mode 100644
index 0000000..15393be
--- /dev/null
+++ b/spring-boot/05-bank-rest-client/src/main/resources/templates/result.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org">
+<head>
+ <title>Check Account Balance</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body>
+ <h1>Result</h1>
+
+ <p th:text="'Account number: ' + ${account.accountNumber}" />
+ <p th:text="'Balance: ' + ${account.balance}" />
+
+ <a href="/acc">Try again</a>
+</body>
+</html> \ No newline at end of file