8.6. 책 수정 화면 뷰 작성하기

수정 뷰 화면은 책 생성 화면을 복사해서 수정하겠습니다.

src/main/resources > templates.book > edit.html

Copy<html xmlns:th="http://www.thymeleaf.org">  
  <head>  
  <title>책 수정하기</title>  
  </head>  
  <body>  
  <h1>책 수정하기</h1>  
  <form method="POST" th:action="@{/book/edit/{id}(id=*{bookId})}" th:object="${bookEditResponseDTO}">  
  <p>제목 : <input type="text" name="title" th:value="*{title}" style="width:300px;" /></p>    
  <p>가격 : <input type="text" name="price" th:value="*{price}" style="width:300px;" /></p>  
  <p><input type="submit" value="저장" />  
  </form>  
  </body>  
</html>