12 Commits

Author SHA1 Message Date
kkazuya
0b9eff82c5 [EDIT] 二次実装に伴う定数の追加と、AOPのクラスも定数クラスを参照するよう編集しました。 2026-09-29 13:06:31 +09:00
kkazuya
000c1fa464 Merge branch 'n-kawahito' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into k-kobayashi 2026-09-29 12:45:53 +09:00
kkazuya
81b426b579 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into k-kobayashi 2026-09-29 12:45:37 +09:00
438ff59bc2 [FIX]画面デザインの不具合を調整しました。 2026-09-29 11:32:22 +09:00
s-choi
f5c410b352 [FIX] 脱退したらログインできないように修正しました。 2026-09-29 11:31:25 +09:00
94b526a045 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into n-kawahito 2026-09-29 11:15:50 +09:00
4a9a1d0898 [FIX]コース選択画面のデザイン修正 2026-09-29 11:13:13 +09:00
759df536a5 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into n-kawahito 2026-09-29 11:00:07 +09:00
98ebb86673 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into n-kawahito 2026-09-29 10:55:37 +09:00
3a825196e1 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into n-kawahito 2026-09-29 10:22:16 +09:00
718b90cee6 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into n-kawahito 2026-09-29 10:02:56 +09:00
74b7032ffc [FIX]デザインを修正しました 2026-09-28 17:06:13 +09:00
14 changed files with 93 additions and 58 deletions

View File

@@ -10,6 +10,7 @@ import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.example.demo.app.presentation.controller.pageproperty.SessionKeyword;
import com.example.demo.exception.NoSessionException; import com.example.demo.exception.NoSessionException;
@@ -32,7 +33,7 @@ public class SessionCheckAspect {
public void checkSession() { public void checkSession() {
HttpSession session = request.getSession(false); HttpSession session = request.getSession(false);
if (session == null || session.getAttribute("loginUser") == null) { if (session == null || session.getAttribute(SessionKeyword.LOGIN_USER) == null) {
throw new NoSessionException("不正なログインです"); throw new NoSessionException("不正なログインです");
} }

View File

@@ -12,6 +12,8 @@ import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import com.example.demo.app.presentation.controller.pageproperty.PageReturnAttributeKeyword;
import com.example.demo.app.presentation.controller.pageproperty.TransitionTargetPageNameKeyword;
import com.example.demo.exception.NoSessionException; import com.example.demo.exception.NoSessionException;
@ControllerAdvice @ControllerAdvice
@@ -30,18 +32,18 @@ public class GlobalExceptionHandler {
LOGGER.log(Level.SEVERE, SEVERE_ERROR_MESSAGE_ILLEGAL_TRANSITION, e); LOGGER.log(Level.SEVERE, SEVERE_ERROR_MESSAGE_ILLEGAL_TRANSITION, e);
model.addAttribute( model.addAttribute(
"errorMessage", PageReturnAttributeKeyword.ERROR_MESSAGE,
"システムエラーが発生しました。" "システムエラーが発生しました。"
+ "初めからやり直してください。"); + "初めからやり直してください。");
return "redirect:/login"; return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.LOGIN;
} }
@ExceptionHandler(HttpRequestMethodNotSupportedException.class) @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
public String handleBadRequestException(Model model, Exception e, HttpSession session) { public String handleBadRequestException(Model model, Exception e, HttpSession session) {
model.addAttribute("error", SEVERE_ERROR_MESSAGE_BAD_REQUEST); model.addAttribute(PageReturnAttributeKeyword.ERROR, SEVERE_ERROR_MESSAGE_BAD_REQUEST);
model.addAttribute("status", HttpStatus.BAD_REQUEST.value()); model.addAttribute(PageReturnAttributeKeyword.STATUS, HttpStatus.BAD_REQUEST.value());
e.printStackTrace(); e.printStackTrace();
@@ -50,7 +52,7 @@ public class GlobalExceptionHandler {
System.out.println("session invalidated"); System.out.println("session invalidated");
session.invalidate(); session.invalidate();
return "error"; return TransitionTargetPageNameKeyword.ERROR_HTML;
} }
@ExceptionHandler(Exception.class) @ExceptionHandler(Exception.class)
@@ -60,6 +62,6 @@ public class GlobalExceptionHandler {
System.out.println("session invalidated exception"); System.out.println("session invalidated exception");
session.invalidate(); session.invalidate();
return "error"; return TransitionTargetPageNameKeyword.ERROR_HTML;
} }
} }

View File

@@ -25,6 +25,8 @@ public class LoginServiceImpl implements LoginService {
if (userEntity == null) { if (userEntity == null) {
return null; return null;
} else if (userEntity.getDeleteFlag() == 1) {
return null;
} }
boolean isValidPassword = false; boolean isValidPassword = false;

View File

@@ -275,7 +275,7 @@ public class GoalController {
int currentAmount = goalService.getCurrentAmount(userId); int currentAmount = goalService.getCurrentAmount(userId);
model.addAttribute("currentAmount", currentAmount); model.addAttribute(PageReturnAttributeKeyword.CURRENT_AMOUNT, currentAmount);
return TransitionTargetPageNameKeyword.GOAL_CREATE_HTML; return TransitionTargetPageNameKeyword.GOAL_CREATE_HTML;
} }

View File

@@ -4,7 +4,8 @@ public class PageReturnAttributeKeyword {
public static final String ERROR_MESSAGE = "errorMessage"; public static final String ERROR_MESSAGE = "errorMessage";
public static final String MESSAGE = "message"; public static final String MESSAGE = "message";
public static final String ERROR = "error";
public static final String STATUS = "status";
public static final String QUESTION_LIST = "questionList"; public static final String QUESTION_LIST = "questionList";
public static final String USER_FORM = "userForm"; public static final String USER_FORM = "userForm";

View File

@@ -35,7 +35,7 @@
<table class="table text-center"> <table class="table text-center">
<thead> <thead>
<tr> <tr>
<th scope="col">カテゴリ別</th> <th scope="col"></th>
<th scope="col">支出</th> <th scope="col">支出</th>
<th scope="col">前月比</th> <th scope="col">前月比</th>
</tr> </tr>

View File

@@ -9,13 +9,13 @@
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
</head> </head>
<body class="pb-5 pt-5"> <body style="padding-top:80px; padding-bottom:80px;">
<div th:replace="~{header :: header}"></div> <div th:replace="~{header :: header}"></div>
<div class="main-container"> <div class="main-container">
<div> <div>
<ul> <ul class="list-unstyled p-0 m-0">
<li class="card shadow-sm mb-3" th:each="categoryForm : ${categoryFormList}"> <li class="card shadow-sm mb-3" th:each="categoryForm : ${categoryFormList}">
<div class="card-body"> <div class="card-body">
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">
@@ -49,19 +49,29 @@
</div> </div>
<hr>
<hr>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
<div class="d-grid mt-4">
<form th:action="@{/category/create}" method="get">
<input type="hidden"
name="today"
id="today"
th:value="${today}">
<form th:action="@{/category/create}" method="get"> <button class="btn btn-success w-100" type="submit">
<input type="hidden" name="today" id="today" th:value="${today}"> 新規登録
<button type="submit">新規登録</button> </button>
</form>
</form>
</div>
</div>
<div th:replace="~{footer :: footer}"></div> <div th:replace="~{footer :: footer}"></div>
</body> </body>

View File

@@ -47,7 +47,7 @@
<input type="hidden" name="categoryId" th:value="${categoryId}"> <input type="hidden" name="categoryId" th:value="${categoryId}">
<div class="d-grid"> <div class="d-grid">
<button type="submit" class="btn btn-primary">登録</button> <button type="submit" class="btn btn-primary">更新</button>
</div> </div>
</form> </form>
</div> </div>

View File

@@ -10,7 +10,7 @@
<link rel="stylesheet" th:href="@{/css/style.css}"> <link rel="stylesheet" th:href="@{/css/style.css}">
</head> </head>
<body class="pb-5 pt-5"> <body style="padding-top:80px; padding-bottom:80px;">
<div th:replace="~{header :: header}"></div> <div th:replace="~{header :: header}"></div>
<div class="main-container"> <div class="main-container">
@@ -19,7 +19,7 @@
<h2 class="page-title" th:text="${today}"></h2> <h2 class="page-title" th:text="${today}"></h2>
<div> <div>
<ul> <ul class="list-unstyled p-0 m-0">
<li th:each="fixedCostForm : ${fixedCostFormList}" class="card shadow-sm mb-3"> <li th:each="fixedCostForm : ${fixedCostFormList}" class="card shadow-sm mb-3">
<div class="card-body"> <div class="card-body">
@@ -52,21 +52,29 @@
</div> </div>
<hr>
<hr>
</div> </div>
</li> </li>
</ul>
</div> </div>
</ul> <div class="d-grid mt-4">
<form th:action="@{/category/create}" method="get">
<input type="hidden"
name="today"
id="today"
th:value="${today}">
<button class="btn btn-success w-100" type="submit">
新規登録
</button>
</form>
</div>
</div> </div>
<form th:action="@{/fixed-cost/create}" method="get">
<input type="hidden" name="today" id="today" th:value="${today}">
<button type="submit">新規登録</button>
</form>
<div th:replace="~{footer :: footer}"></div> <div th:replace="~{footer :: footer}"></div>
</body> </body>

View File

@@ -51,9 +51,12 @@
<button type="submit" class="btn btn-sm btn-primary w-100">登録</button> <button type="submit" class="btn btn-sm btn-primary w-100">登録</button>
</form> </form>
<div th:replace="~{footer :: footer}"></div> </div>
</div>
</div>
<div th:replace="~{footer :: footer}"></div>
</body> </body>

View File

@@ -8,7 +8,7 @@
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
</head> </head>
<body class="pb-5 pt-5"> <body style="padding-top:80px; padding-bottom:80px;">
<div th:replace="~{header :: header}"></div> <div th:replace="~{header :: header}"></div>
@@ -74,16 +74,16 @@
</ul> </ul>
</div> </div>
<div class="d-grid mt-4">
<form th:action="@{/goal}" method="get">
<button class="btn btn-success w-100" type="submit">
戻る
</button>
</form>
</div>
</div> </div>
<div class="d-grid mt-4">
<form th:action="@{/goal}" method="get">
<button class="btn btn-success w-100" type="submit">
戻る
</button>
</form>
</div>
</div> </div>
<div th:replace="~{footer :: footer}"></div> <div th:replace="~{footer :: footer}"></div>

View File

@@ -189,6 +189,8 @@
</div> </div>
<div class="d-grid gap-2 mt-4">
<form th:action="@{/goal/create}" method="get"> <form th:action="@{/goal/create}" method="get">
<button type="submit" class="btn btn-success w-100"> <button type="submit" class="btn btn-success w-100">
@@ -204,6 +206,8 @@
</button> </button>
</form> </form>
</div>
<div th:replace="~{footer :: footer}"></div> <div th:replace="~{footer :: footer}"></div>

View File

@@ -101,15 +101,15 @@
max="10000000" max="10000000"
required> required>
</div> </div>
<div class="d-grid">
<button type="submit"
class="btn btn-primary">
編集
</button>
</div>
</div> </div>
<div class="d-grid">
<button type="submit"
class="btn btn-primary">
確定
</button>
</div>
</form> </form>

View File

@@ -5,6 +5,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" th:href="@{/css/style.css}">
<title>コース選択</title> <title>コース選択</title>
</head> </head>
@@ -12,13 +13,15 @@
<div th:replace="~{header :: header}"></div> <div th:replace="~{header :: header}"></div>
<h1 class="page-title">コース選択</h1> <h1 class="page-title">コース選択</h1>
<th:block th:if="${mode == 'change'}"> <div class="d-grid gap-2 mt-4">
<form th:action="@{/course/create}" method="get"> <th:block th:if="${mode == 'change'}">
<button type="submit">新規登録</button> <form th:action="@{/course/create}" method="get">
</form> <button class="btn btn-success w-100" type="submit">
新規登録
</button>
</th:block> </form>
</th:block>
<form th:action="${mode == 'regist'} ? @{/user/register/return}: @{/change}" method="post"> <form th:action="${mode == 'regist'} ? @{/user/register/return}: @{/change}" method="post">
<button type="submit" class="btn btn-primary w-100">確定</button> <button type="submit" class="btn btn-primary w-100">確定</button>
@@ -53,6 +56,7 @@
</div> </div>
</div> </div>
</form> </form>
</div>
<th:block th:if="${mode=='change'}"> <th:block th:if="${mode=='change'}">
<div th:replace="~{footer :: footer}"></div> <div th:replace="~{footer :: footer}"></div>