This commit is contained in:
y-kumaki
2026-09-18 13:11:35 +09:00
4 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package com.example.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class Book {
@GetMapping("/book")
public String book() {
// HTMLテンプレートに welcome-spring.html を指定
return "book";
}
}

View File

@@ -0,0 +1,14 @@
package com.example.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
@Controller
public class BookLend {
@PostMapping("/bookLend")
public String welcome() {
// HTMLテンプレートに welcome-spring.html を指定
return "bookLend";
}
}

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="bookLend">
<button type="submit" class="btn-login">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg>
画面遷移テスト
</button>
</form>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
成功
</body>
</html>