thymeleaf 타임리프

gga·2021년 6월 14일
0

thymeleaf 설정

build.gradlethymeleaf를 추가한다.

dependencies {	
    implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
}

html 태그에 아래와 같이 입력한다.

<html lang="en" xmlns:th="http://www.thymeleaf.org">

이 두가지를 설정해주면 thymeleaf를 사용할 수 있다.

주의 사항

intellij인 경우
html 경로가 static에서 templates로 바뀐다.

0개의 댓글