build.gradle
에 thymeleaf
를 추가한다.
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
}
html
태그에 아래와 같이 입력한다.
<html lang="en" xmlns:th="http://www.thymeleaf.org">
이 두가지를 설정해주면 thymeleaf
를 사용할 수 있다.
intellij인 경우
html
경로가 static
에서 templates
로 바뀐다.