Front-End/JSP, Thymeleaf
springBoot에서 타임리프 default 세팅
doriver
2024. 5. 21. 19:12
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설정값은 위에 정리한 내용인듯