This commit is contained in:
s-sakiyama
2026-10-07 16:24:58 +09:00
parent c7eb251d1f
commit 647829924d
7 changed files with 146 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
package com.example.demo.controllers;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class InitialController {
@RequestMapping(value = "/", method = RequestMethod.GET)
public String index() {
return "login";// login+html
}
@RequestMapping(value = "/doLogout", method = RequestMethod.POST)
public String doLogout() {
return "login";
}
@RequestMapping(value = "/doLogin", method = RequestMethod.POST)
public String doLogin() {
return "menu";
}
@RequestMapping(value = "/doSelect", method = RequestMethod.POST)
public String doSelect() {
return "select";
}
@RequestMapping(value = "/doInsert", method = RequestMethod.POST)
public String doInsert() {
return "insert";
}
@RequestMapping(value = "/doUpdate", method = RequestMethod.POST)
public String doUpdate() {
return "update";
}
@RequestMapping(value = "/doDelete", method = RequestMethod.POST)
public String doDelete() {
return "delete";
}
}

View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html xmlns="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>デリートページ</title>
</head>
<body>
<h1>デリートページ</h1>
<form action="doLogin" method="POST">
<input type="submit" value="戻る">
</form>
<form action="doLogout" method="POST">
<input type="submit" value="ログアウト">
</form>
</body>
</html>

View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html xmlns="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>インサートページ</title>
</head>
<body>
<h1>インサートページ</h1>
<form action="doLogin" method="POST">
<input type="submit" value="戻る">
</form>
<form action="doLogout" method="POST">
<input type="submit" value="ログアウト">
</form>
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html xmlns="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>ログインページ</title>
</head>
<body>
<h1>ログインページ</h1>
<form action="doLogin" method="POST">
<input type="submit" value="ログイン">
</form>
</body>
</html>

View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html xmlns="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>メニューページ</title>
</head>
<body>
<h1>メニューページ</h1>
<form action="doSelect" method="POST">
<input type="submit" value="検索">
</form>
<form action="doInsert" method="POST">
<input type="submit" value="登録">
</form>
<form action="doUpdate" method="POST">
<input type="submit" value="更新">
</form>
<form action="doDelete" method="POST">
<input type="submit" value="削除">
</form>
<form action="doLogout" method="POST">
<input type="submit" value="ログアウト">
</form>
</body>
</html>

View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html xmlns="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>セレクトページ</title>
</head>
<body>
<h1>セレクトページ</h1>
<form action="doLogin" method="POST">
<input type="submit" value="戻る">
</form>
<form action="doLogout" method="POST">
<input type="submit" value="ログアウト">
</form>
</body>
</html>

View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html xmlns="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>アップデートページ</title>
</head>
<body>
<h1>アップデートページ</h1>
<form action="doLogin" method="POST">
<input type="submit" value="戻る">
</form>
<form action="doLogout" method="POST">
<input type="submit" value="ログアウト">
</form>
</body>
</html>