1. application.properties 설정 추가
spring.thymeleaf.prefix=classpath:templates/
spring.thymeleaf.check-template-location=true
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=HTML
spring.thymeleaf.cache=false
2. build.gradle 설정 추가
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
3. html 경로 설정
- 설정된 templates 하위 경로에 html 파일 생성
- Controller를 통해 해당 경로 html 호출
4. Tyhmeleaf가 적용되지 않는 경우
- 혹시나 Thymeleaf가 적용되지 않는 경우 프로젝트 우클릭 > Gradle > Refresh Gradle Project 클릭 후 Spring Boot 재실행
5. html 호출 확인
- templates 하위 경로의 html을 정상적으로 불러오는 것을 확인할 수 있습니다.