From 647829924dafd8c5e5f5d1b56ffd5658101228c4 Mon Sep 17 00:00:00 2001 From: s-sakiyama <26-m-s-stella-tecnica@it-college.jp> Date: Wed, 7 Oct 2026 16:24:58 +0900 Subject: [PATCH] HTML Q1 --- .../demo/controllers/InitialController.java | 43 +++++++++++++++++++ .../src/main/resources/templates/delete.html | 16 +++++++ .../src/main/resources/templates/insert.html | 16 +++++++ .../src/main/resources/templates/login.html | 13 ++++++ .../src/main/resources/templates/menu.html | 26 +++++++++++ .../src/main/resources/templates/select.html | 16 +++++++ .../src/main/resources/templates/update.html | 16 +++++++ 7 files changed, 146 insertions(+) create mode 100644 spring/spring-html/src/main/java/com/example/demo/controllers/InitialController.java create mode 100644 spring/spring-html/src/main/resources/templates/delete.html create mode 100644 spring/spring-html/src/main/resources/templates/insert.html create mode 100644 spring/spring-html/src/main/resources/templates/login.html create mode 100644 spring/spring-html/src/main/resources/templates/menu.html create mode 100644 spring/spring-html/src/main/resources/templates/select.html create mode 100644 spring/spring-html/src/main/resources/templates/update.html diff --git a/spring/spring-html/src/main/java/com/example/demo/controllers/InitialController.java b/spring/spring-html/src/main/java/com/example/demo/controllers/InitialController.java new file mode 100644 index 0000000..90181c7 --- /dev/null +++ b/spring/spring-html/src/main/java/com/example/demo/controllers/InitialController.java @@ -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"; + } +} diff --git a/spring/spring-html/src/main/resources/templates/delete.html b/spring/spring-html/src/main/resources/templates/delete.html new file mode 100644 index 0000000..aa888b7 --- /dev/null +++ b/spring/spring-html/src/main/resources/templates/delete.html @@ -0,0 +1,16 @@ + + + + +デリートページ + + +

デリートページ

+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/spring/spring-html/src/main/resources/templates/insert.html b/spring/spring-html/src/main/resources/templates/insert.html new file mode 100644 index 0000000..9da5283 --- /dev/null +++ b/spring/spring-html/src/main/resources/templates/insert.html @@ -0,0 +1,16 @@ + + + + +インサートページ + + +

インサートページ

+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/spring/spring-html/src/main/resources/templates/login.html b/spring/spring-html/src/main/resources/templates/login.html new file mode 100644 index 0000000..32a9a33 --- /dev/null +++ b/spring/spring-html/src/main/resources/templates/login.html @@ -0,0 +1,13 @@ + + + + +ログインページ + + +

ログインページ

+
+ +
+ + \ No newline at end of file diff --git a/spring/spring-html/src/main/resources/templates/menu.html b/spring/spring-html/src/main/resources/templates/menu.html new file mode 100644 index 0000000..7115d16 --- /dev/null +++ b/spring/spring-html/src/main/resources/templates/menu.html @@ -0,0 +1,26 @@ + + + + +メニューページ + + +

メニューページ

+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/spring/spring-html/src/main/resources/templates/select.html b/spring/spring-html/src/main/resources/templates/select.html new file mode 100644 index 0000000..ef3ed67 --- /dev/null +++ b/spring/spring-html/src/main/resources/templates/select.html @@ -0,0 +1,16 @@ + + + + +セレクトページ + + +

セレクトページ

+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/spring/spring-html/src/main/resources/templates/update.html b/spring/spring-html/src/main/resources/templates/update.html new file mode 100644 index 0000000..0d79aec --- /dev/null +++ b/spring/spring-html/src/main/resources/templates/update.html @@ -0,0 +1,16 @@ + + + + +アップデートページ + + +

アップデートページ

+
+ +
+
+ +
+ + \ No newline at end of file