We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/blogs
creatorId
blogs/new?creatorId=${creatorId}
<!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>
/blogs/new
<!DOCTYPE HTML> <html xmlns:th="http://www.thymeleaf.org"> <body> <div class="container"> <h1><span th:text="${name}"/>의 블로그</h1> <form action="/blogs/new" method="post"> <input type="hidden" id="creatorId" name="creatorId" th:value="${creatorId}"> <div class="form-group"> <label for="title">제목</label> <input type="text" id="title" name="title" placeholder="제목을 입력하세요"> </div> <div class="form-group"> <label for="contents">내용</label> <textarea id="contents" name="contents" placeholder="내용을 입력하세요"></textarea> </div> <button type="submit">등록</button> </form> </div> <!-- /container --> </body> </html>
/blogs/�update
blogId
<!DOCTYPE HTML> <html xmlns:th="http://www.thymeleaf.org"> <body> <div class="container"> <h1><span th:text="${name}"/>의 블로그</h1> <form action="/blogs/update" method="post"> <input type="hidden" id="creatorId" name="creatorId" th:value="${creatorId}"> <input type="hidden" id="id" name="id" th:value="${blog.id}"> <div class="form-group"> <label for="title">제목</label> <input type="text" id="title" name="title" placeholder="제목을 입력하세요" th:value="${blog.title}"> </div> <div class="form-group"> <label for="contents">내용</label> <textarea id="contents" name="contents" placeholder="내용을 입력하세요" th:text="${blog.contents}"></textarea> </div> <button type="submit">등록</button> </form> </div> <!-- /container --> </body> </html>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
블로그 CRUD 구현
1. 블로그 리스트
/blogs
creatorId
creatorId
가 없으면 에러 throwcreatorId
가 생성한 글들을 리스트 업blogs/new?creatorId=${creatorId}
) 로 이동blogList.html
2. 블로그 생성
/blogs/new
creatorId
creatorId
가 없으면 에러 throwcreatorId
가 없으면 에러 throwcreateBlogForm.html
3. 블로그 수정
/blogs/�update
creatorId
creatorId
가 없으면 에러 throwblogId
blogId
가 없으면 에러 throwcreatorId
가 없으면 에러 throwupdateBlogForm.html
4. 블로그 삭제
creatorId
가 없으면 에러 throwThe text was updated successfully, but these errors were encountered: