diff --git a/src/main/java/com/example/demo/app/presentation/controller/GoalController.java b/src/main/java/com/example/demo/app/presentation/controller/GoalController.java index 61133c1..fdbf9c4 100644 --- a/src/main/java/com/example/demo/app/presentation/controller/GoalController.java +++ b/src/main/java/com/example/demo/app/presentation/controller/GoalController.java @@ -275,7 +275,9 @@ public class GoalController { int currentAmount = goalService.getCurrentAmount(userId); - model.addAttribute(PageReturnAttributeKeyword.CURRENT_AMOUNT, currentAmount); + System.out.println("************************currentAmount : " + currentAmount); + + session.setAttribute(PageReturnAttributeKeyword.CURRENT_AMOUNT, currentAmount); return TransitionTargetPageNameKeyword.GOAL_CREATE_HTML; } @@ -292,7 +294,7 @@ public class GoalController { model.addAttribute(PageReturnAttributeKeyword.MESSAGE, "現在所持金より高い金額を設定してください。"); return TransitionTargetPageNameKeyword.GOAL_CREATE_HTML; } - + return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.GOAL; } diff --git a/src/main/resources/templates/goal_create.html b/src/main/resources/templates/goal_create.html index 7acbe37..ebb9f05 100644 --- a/src/main/resources/templates/goal_create.html +++ b/src/main/resources/templates/goal_create.html @@ -37,7 +37,9 @@
- +
+ +