質問編集履歴
2
PersonRepository追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -66,14 +66,6 @@
|
|
66
66
|
|
67
67
|
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
|
68
68
|
|
69
|
-
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
|
70
|
-
|
71
|
-
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878)
|
72
|
-
|
73
|
-
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792)
|
74
|
-
|
75
|
-
|
76
|
-
|
77
69
|
```
|
78
70
|
|
79
71
|
```Person
|
@@ -541,3 +533,27 @@
|
|
541
533
|
</html>
|
542
534
|
|
543
535
|
```
|
536
|
+
|
537
|
+
```PersonRepository
|
538
|
+
|
539
|
+
package jp.kuroda.sampleBlog.repository;
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
import org.springframework.data.jpa.repository.JpaRepository;
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
import jp.kuroda.sampleBlog.model.Person;
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
public interface PersonRepository extends JpaRepository<Person, Integer>{
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
}
|
556
|
+
|
557
|
+
コード
|
558
|
+
|
559
|
+
```
|
1
html記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -72,21 +72,7 @@
|
|
72
72
|
|
73
73
|
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792)
|
74
74
|
|
75
|
-
|
75
|
+
|
76
|
-
|
77
|
-
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
|
78
|
-
|
79
|
-
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
|
80
|
-
|
81
|
-
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
82
|
-
|
83
|
-
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
|
84
|
-
|
85
|
-
at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
|
86
|
-
|
87
|
-
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
88
|
-
|
89
|
-
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
|
90
76
|
|
91
77
|
```
|
92
78
|
|
@@ -503,3 +489,55 @@
|
|
503
489
|
}
|
504
490
|
|
505
491
|
```
|
492
|
+
|
493
|
+
```html
|
494
|
+
|
495
|
+
<!DOCTYPE html>
|
496
|
+
|
497
|
+
<html xmlns:th="http://www.thymeleaf.org/"
|
498
|
+
|
499
|
+
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
500
|
+
|
501
|
+
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
|
502
|
+
|
503
|
+
<head>
|
504
|
+
|
505
|
+
<meta charset="UTF-8">
|
506
|
+
|
507
|
+
<title>プロフィール編集</title>
|
508
|
+
|
509
|
+
</head>
|
510
|
+
|
511
|
+
<body>
|
512
|
+
|
513
|
+
<form th:action="@{/person/edit}" th:object="${person}" method="post">
|
514
|
+
|
515
|
+
<div>
|
516
|
+
|
517
|
+
名前<br>
|
518
|
+
|
519
|
+
<input type="text" th:field="*{name}">
|
520
|
+
|
521
|
+
</div>
|
522
|
+
|
523
|
+
<div>
|
524
|
+
|
525
|
+
誕生日<br>
|
526
|
+
|
527
|
+
<input type="date" th:field="*{birthday}">
|
528
|
+
|
529
|
+
</div>
|
530
|
+
|
531
|
+
<div>
|
532
|
+
|
533
|
+
<input type="submit" value="編集">
|
534
|
+
|
535
|
+
</div>
|
536
|
+
|
537
|
+
</form>
|
538
|
+
|
539
|
+
</body>
|
540
|
+
|
541
|
+
</html>
|
542
|
+
|
543
|
+
```
|