![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F7H9HL%2FbtrYRgp7jIx%2FqMgKG92z5Qe4XdfMGnGHyK%2Fimg.png)
[Thymeleaf] th:value와 th:field를 함께 쓰면 value는 무시된다.
·
Server/Spring&Spring Boot
게시글의 수정 파트를 제작하기 위해 아래와 같이 코드를 작성하였을 때, 제목 다음과 같이 value 명령이 진행되지 않고, 계속해서 placeholder의 값만 화면에 등장하였다. th:field의 값을 제거하고 나서야, 원하는 값이 반환되기 시작했는데 th:field는 HTML 태그의 id, name, value 속성을 자동으로 매핑시켜주는 역할을 하므로 value의 값을 무시하게 되는 것입니다. 결과 제목 참조 Tutorial: Thymeleaf + Spring Preface This tutorial explains how Thymeleaf can be integrated with the Spring Framework, especially (but not only) Spring MVC. Note th..