Merge branch 'a-kawaguchi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/ShareBooks_new into s-tajihi
This commit is contained in:
14
src/main/java/com/example/demo/controller/Book.java
Normal file
14
src/main/java/com/example/demo/controller/Book.java
Normal 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";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
14
src/main/java/com/example/demo/controller/BookLend.java
Normal file
14
src/main/java/com/example/demo/controller/BookLend.java
Normal 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";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
18
src/main/resources/templates/book.html
Normal file
18
src/main/resources/templates/book.html
Normal 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>
|
||||||
11
src/main/resources/templates/bookLend.html
Normal file
11
src/main/resources/templates/bookLend.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
成功
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user