diff --git a/book-rent/src/main/java/com/example/demo/controller/MenuController.java b/book-rent/src/main/java/com/example/demo/controller/MenuController.java index 7ba61b1..a84e905 100644 --- a/book-rent/src/main/java/com/example/demo/controller/MenuController.java +++ b/book-rent/src/main/java/com/example/demo/controller/MenuController.java @@ -1,5 +1,19 @@ package com.example.demo.controller; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller public class MenuController { + @GetMapping("/menu") + public String showMenu(Model model) { + + // 仮のログインユーザー名 + model.addAttribute("loginUserName", "テストユーザー"); + + // menu.htmlを表示 + return "menu"; + } } diff --git a/book-rent/src/main/resources/templates/login.html b/book-rent/src/main/resources/templates/login.html index 2571001..6ee30de 100644 --- a/book-rent/src/main/resources/templates/login.html +++ b/book-rent/src/main/resources/templates/login.html @@ -1,10 +1,94 @@ - + + - -Insert title here + + + + + + + + + + + ログイン + +
+ +

ログイン

+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + +
メールアドレス + +
パスワード + +
+ + + +
+ +
+ +
+ + + + \ No newline at end of file diff --git a/book-rent/src/main/resources/templates/menu.html b/book-rent/src/main/resources/templates/menu.html new file mode 100644 index 0000000..e14f482 --- /dev/null +++ b/book-rent/src/main/resources/templates/menu.html @@ -0,0 +1,36 @@ + + + + + + メニュー + + + + + + + +

メニュー

+ +
+ ログインユーザー: + ユーザー名 + +
+ +
+
+ + + + + \ No newline at end of file