서버 사이드 템플릿 엔진 으로는 Thymeleaf, JSP, Freemaker, Groovy, Mustache가 있다.
가장 큰 장점
natural remplates → 확장자명 .html
문법을 html 태그 안에서 속성으로 사용된다.
<p th:text = "${data}"> Hello Thymeleaf</p>
thymeleaf 의 문법을 추가하기 위해 아래와 같이 설정해주기.
<!DOCTYPE html>
<html xmlns:th="<http://www.thymeleaf.org>"
xmlns:layout="<http://www.ultraq.net.nz/thymeleaf/layout>"
layout:decorate="~{layouts/layout1}">
부트 스트랩으로 꾸미기.
Bootstrap CDN 추가.
다운로드 한 후 애플리케이션에 추가할 수 있지만 편의상 Bootstrap CDN만 추가 한다.
Bootstrap을 추가하여 해당 리소스를 다운로드 해서 사용할 수 있도록 한다.
(위의 Thymeleaf Layout에서 layout1 에 적혀있는 css, js 등임.)
https://getbootstrap.com/docs/5.3/getting-started/introduction/