HTML Q1
This commit is contained in:
@@ -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";
|
||||||
|
}
|
||||||
|
}
|
||||||
16
spring/spring-html/src/main/resources/templates/delete.html
Normal file
16
spring/spring-html/src/main/resources/templates/delete.html
Normal 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>
|
||||||
16
spring/spring-html/src/main/resources/templates/insert.html
Normal file
16
spring/spring-html/src/main/resources/templates/insert.html
Normal 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>
|
||||||
13
spring/spring-html/src/main/resources/templates/login.html
Normal file
13
spring/spring-html/src/main/resources/templates/login.html
Normal 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>
|
||||||
26
spring/spring-html/src/main/resources/templates/menu.html
Normal file
26
spring/spring-html/src/main/resources/templates/menu.html
Normal 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>
|
||||||
16
spring/spring-html/src/main/resources/templates/select.html
Normal file
16
spring/spring-html/src/main/resources/templates/select.html
Normal 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>
|
||||||
16
spring/spring-html/src/main/resources/templates/update.html
Normal file
16
spring/spring-html/src/main/resources/templates/update.html
Normal 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>
|
||||||
Reference in New Issue
Block a user