From d3b76fb2cde0f8c69f83fbbdaded2e019d8b6ade Mon Sep 17 00:00:00 2001 From: s-choi Date: Tue, 29 Sep 2026 15:59:14 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20=E6=89=80=E6=8C=81=E9=87=91=E3=81=8Cnul?= =?UTF-8?q?l=E3=81=AB=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=82=8B?= =?UTF-8?q?=E3=83=90=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=BE?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/app/presentation/controller/GoalController.java | 6 ++++-- src/main/resources/templates/goal_create.html | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) 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 @@
- +
+ +