타임리프 의존성 추가
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
타임리프 적용할 html에 태그 추가하기
타임리프의 th속성을 사용하기 위해 추가
순수 html파일의 경우 알아서 자동으로 controller랑 연결
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<h2 th:text="${data}">Hello World<h2>
<body>
<h2>
<a th:href="@{|/question/detail/${question.id}|}"></a>
</h2>
</body>
<input type="text" id="userId" th:value="${userId} + '의 이름은 ${userName}"/>