allTransactions = Application.transactionService.findAll();
-
- resp.setContentType("application/json; charset=UTF-8");
- resp.getWriter().print(Application.objectMapper.writeValueAsString(allTransactions));
- }
- }
-
- @Override
- protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
- if (req.getRequestURI().equalsIgnoreCase("/transactions")) {
- int amount = Integer.parseInt(req.getParameter("amount"));
- String reference = req.getParameter("reference");
- Application.transactionService.createTransaction(amount, reference);
- }
- }
-}
diff --git a/src/main/java/com/sergiubarsa/mybank/web/forms/CreateTransactionForm.java b/src/main/java/com/sergiubarsa/mybank/web/forms/CreateTransactionForm.java
new file mode 100644
index 0000000..348ff9c
--- /dev/null
+++ b/src/main/java/com/sergiubarsa/mybank/web/forms/CreateTransactionForm.java
@@ -0,0 +1,32 @@
+package com.sergiubarsa.mybank.web.forms;
+
+public class CreateTransactionForm {
+
+ private String receivingUserId;
+ private int amount;
+ private String reference;
+
+ public int getAmount() {
+ return amount;
+ }
+
+ public void setAmount(int amount) {
+ this.amount = amount;
+ }
+
+ public String getReceivingUserId() {
+ return receivingUserId;
+ }
+
+ public void setReceivingUserId(String receivingUserId) {
+ this.receivingUserId = receivingUserId;
+ }
+
+ public String getReference() {
+ return reference;
+ }
+
+ public void setReference(String reference) {
+ this.reference = reference;
+ }
+}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
new file mode 100644
index 0000000..b3c98f2
--- /dev/null
+++ b/src/main/resources/application.properties
@@ -0,0 +1 @@
+bank.slogan=Hello Bank
\ No newline at end of file
diff --git a/src/main/resources/templates/account.html b/src/main/resources/templates/account.html
new file mode 100644
index 0000000..612e757
--- /dev/null
+++ b/src/main/resources/templates/account.html
@@ -0,0 +1,60 @@
+
+
+
+ Transactions
+
+
+Your Transactions
+
+
+
+
+ | # |
+ ID |
+ Amount |
+ Reference |
+ Timestamp |
+ Slogan |
+ User |
+
+
+
+
+
+ | 1 |
+ abc |
+ $ |
+ ref |
+ date |
+ slogan |
+ user |
+
+
+
+
+No transactions recorded. Life is boring.
+
+Create Transaction
+
+
+
+
+
\ No newline at end of file