<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<body>
<div class="container">
<div>
<h1><span th:text="${name}"/>의 블로그</h1>
<p>
<a th:href="@{/blogs/new(creatorId=${creatorId})}">생성</a>
</p>
<table>
<thead>
<tr>
<th>#</th>
<th>제목</th>
<th>내용</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr th:each="blog : ${blogs}">
<td th:text="${blog.id}"></td>
<td th:text="${blog.title}"></td>
<td th:text="${blog.contents}"></td>
<td><a th:href="@{/blogs/update(blogId=${blog.id},creatorId=${creatorId})}">수정</a></td>
<td>
<form th:action="@{/blogs/delete(blogId=${blog.id},creatorId=${creatorId})}" th:method="delete">
<button type="submit">삭제</button>
</form>
</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- /container -->
</body>
</html>
블로그 CRUD 구현
1. 블로그 리스트
/blogscreatorIdcreatorId가 없으면 에러 throwcreatorId가 생성한 글들을 리스트 업blogs/new?creatorId=${creatorId}) 로 이동blogList.html
2. 블로그 생성
/blogs/newcreatorIdcreatorId가 없으면 에러 throwcreatorId가 없으면 에러 throwcreateBlogForm.html
3. 블로그 수정
/blogs/�updatecreatorIdcreatorId가 없으면 에러 throwblogIdblogId가 없으면 에러 throwcreatorId가 없으면 에러 throwupdateBlogForm.html
4. 블로그 삭제
creatorId가 없으면 에러 throw