1.
gradle, dependencies에
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
타임리프 추가해주고

2.
resources / templates 폴더에 html 파일 만들어주고
<html xmlns:th="http://www.thymeleaf.org">
<html> 태그에 위와같이 추가해줌
3.
@Controller클래스에서
html파일 이름만 String으로 리턴해주면 됨
ex) "first"를 리턴
근데
application.yml 에서 mvc - view 쪽 설정으로 경로 잡아줄수 있는듯?
하여튼 default설정값은 위에 정리한 내용인듯
'Front-End > JSP, Thymeleaf' 카테고리의 다른 글
| [ 타임리프 ] 문법 정리 01 (0) | 2024.07.05 |
|---|---|
| HTML, data- 속성 (0) | 2024.07.04 |
| [타임리프] th:each 문 (0) | 2024.04.29 |
| <form> http요청 , id ,name속성 (0) | 2024.04.24 |
| 주석들 (1) | 2024.04.23 |