[add] ログイン用コントローラ、ログインページ、トップメニューページの各ファイルを作成し、追加しました。
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
package com.example.demo.controller;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class LoginController {
|
||||||
|
|
||||||
|
@GetMapping("/login")
|
||||||
|
public String showLogin() {
|
||||||
|
return "login";
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/doLogin")
|
||||||
|
public String doLogin() {
|
||||||
|
return "redirect:/topmenu";
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/topmenu")
|
||||||
|
public String showTopMenu() {
|
||||||
|
return "topmenu";
|
||||||
|
}
|
||||||
|
}
|
||||||
29
src/main/resources/templates/login.html
Normal file
29
src/main/resources/templates/login.html
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>ログイン</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>ログイン</h1>
|
||||||
|
<form action="doLogin"
|
||||||
|
method="post"
|
||||||
|
th:object="${loginInfoForm}">
|
||||||
|
|
||||||
|
<div class="msgBox error" th:if="${messageError} != null">
|
||||||
|
<span class="error" th:text="${messageError.message}"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="btnArea" colspan="2">
|
||||||
|
<input type="submit" value="ログイン"/>
|
||||||
|
<button onclick="clearInput()">リセット</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
86
src/main/resources/templates/topmenu.html
Normal file
86
src/main/resources/templates/topmenu.html
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>トップメニュー</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>
|
||||||
|
メインメニュー
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<a class="card" href="${pageContext.request.contextPath}/equipment/list">
|
||||||
|
|
||||||
|
<div class="icon blue">💻</div>
|
||||||
|
|
||||||
|
<h3>社内備品一覧</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
登録されている備品の<br> 一覧を表示します。
|
||||||
|
</p> <span class="arrow">›</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ===== 共通:社内図書一覧 ===== -->
|
||||||
|
<a class="card"
|
||||||
|
href="${pageContext.request.contextPath}/BookServlet">
|
||||||
|
|
||||||
|
<div class="icon green">📖</div>
|
||||||
|
|
||||||
|
<h3>社内図書一覧</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
登録されている図書の<br> 一覧を表示します。
|
||||||
|
</p> <span class="arrow">›</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ===== 共通:新規図書申請 ===== -->
|
||||||
|
<a class="card"
|
||||||
|
href="${pageContext.request.contextPath}/bookApproval">
|
||||||
|
|
||||||
|
<div class="icon yellow">📗</div>
|
||||||
|
|
||||||
|
<h3>新規図書申請</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
図書の登録申請を<br> 行います。
|
||||||
|
</p> <span class="arrow">›</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ===== 管理者のみ ===== -->
|
||||||
|
|
||||||
|
<a class="card" href="${pageContext.request.contextPath}/employee">
|
||||||
|
|
||||||
|
<div class="icon purple">👥</div>
|
||||||
|
|
||||||
|
<h3>社員一覧</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
社員情報を一覧表示・<br> 管理します。
|
||||||
|
</p> <span class="arrow">›</span>
|
||||||
|
</a> <a class="card" href="${pageContext.request.contextPath}/lendList">
|
||||||
|
|
||||||
|
<div class="icon orange">📅</div>
|
||||||
|
|
||||||
|
<h3>貸出中備品・図書一覧</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
貸出中の備品・図書の<br> 一覧を表示します。
|
||||||
|
</p> <span class="arrow">›</span>
|
||||||
|
</a> <a class="card"
|
||||||
|
href="${pageContext.request.contextPath}/bookApproval-list">
|
||||||
|
|
||||||
|
<div class="icon red">▱</div>
|
||||||
|
|
||||||
|
<h3>新規図書追加申請ボックス</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
図書の追加申請の<br> 受信一覧を確認します。
|
||||||
|
</p> <span class="arrow">›</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user