Thymeleaf를 이용하여 페이지 구현 중 th:object,th:field를 통해 폼 바인딩을 구현✅ th:object는 폼 바인딩을 위해 특정 객체를 지정
✅ th:field는 해당 객체의 필드를 바인딩
<form th:object="${user}">
<input type="text" th:field="*{name}"/>
<input type="text" th:field="*{email}"/>
</form>
th:object="${user}"로 user 객체를 폼 바인딩th:field="*{name}"는 user.name을 자동으로 바인딩, ${user.name}과 동일<form>
<input type="text" th:field="*{name}"/>
</form>
<form th:object="${user}">
<input type="text" value="${user.name}"/>
</form>
th:object,th:field를 사용