<h3>ํ์๋ฆฌํ ๋ณ์, ์ ์ด๋ฌธ</h3>
<p th:text="${'hello world'}"></p>
<p>[[${'hello world'}]]</p>
<p th:text="${1 == 1}"></p>
<p>[[${1 == 1}]]</p>
<p th:text="${1 eq 1}"></p>
<p>[[${1 eq 1}]]</p>
<h3>๋ณ์ ์ ์ธ</h3>
<div th:with="a = 10, b = 20">
[[${a}]]
[[${b}]]
</div>
<h3>์กฐ๊ฑด๋ฌธ</h3>
<div th:with="a = 10">
<span th:if="${a == 10}">10๊ณผ ๊ฐ์</span>
<span th:if="${a != 10}">10๊ณผ ๊ฐ์ง ์๋ค</span>
</div>
<div th:with="a = 10">
<span th:if="${a != 10}">if</span>
<span th:unless="${a != 10}">if์ ์กฐ๊ฑด์ ๋์ผํ๊ฒ ๋ฌ์์ค๋๋ค (else๋ฌธ)</span>
</div>
<h3>3ํญ ์ฐ์ฐ์</h3>
[[${ true ? '์ฐธ์
๋๋ค' : '๊ฑฐ์ง์
๋๋ค'}]]
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h3>๋ฐ๋ณต๋ฌธ</h3>
<!--[[${list}]]-->
<ul>
<li th:each="vo : ${list}">
[[${vo.num}]]
[[${vo.name}]]
[[${vo.addr}]]
[[${vo.age}]]
</li>
</ul>
<h3>๋ฐ๋ณต๋ฌธ๊ณผ state๊ฐ์ฒด</h3>
<ul>
<li th:each="a, state : ${list}">
[[${state}]]<br>
[[${state.index}]]<br>
[[${state.count}]]<br>
[[${state.size}]]<br>
</li>
</ul>
<h3>list์ vo์ num๊ฐ ์ง์์ธ ๊ฒฝ์ฐ๋ง ์ถ๋ ฅ?</h3>
<ul>
<li th:each="a : ${list}" th:if="${a.num % 2 == 0}">
[[${a.num}]]
[[${a.name}]]
</li>
</ul>
</body>
</html>
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h3>block๊ตฌ๋ฌธ</h3>
<!-- ํ์๋ฆฌํ์์ ํน๋ณํ ํ๊ทธ๋ฅผ ์ฐ์ง์๊ณ ๋ง์น ์ค๊ดํธ ์ฒ๋ผ ์ฌ์ฉํ๊ณ ์ถ์ผ๋ฉด ์ธ์ ์๋ ๊ตฌ๋ฌธ-->
<ul>
<th:block th:each="vo : ${list}">
<li>[[${vo}]]</li>
</th:block>
</ul>
<h3>aํ๊ทธ ์ฌ์ฉํ๊ธฐ</h3>
<ul>
<li th:each="vo : ${list}">
<!--<a href="ex03_result?num=${vo.num}">[[${vo.name}]]</a>-->
๋ฐฉ๋ฒ1
<a th:href="@{ex03_result(num=${vo.num}, name=${vo.name}) }">[[${vo.name}]]</a>
<br>
๋ฐฉ๋ฒ2 (pathVariable - URL์ ์ฃผ์๋ฅผ ๊ฐ๋ณ๋งค๊ฐ๋ณ์๋ก ์ฐ๋ ๋ฐฉ๋ฒ)
<!--<a href="๊ฒฝ๋ก/๊ฐ/๊ฐ">[[${vo.name}]]</a>-->
<a th:href="@{ex03_result2/{name}/{age}(name=${vo.name}, age=${vo.age}) }">[[${vo.name}]]</a>
</li>
</ul>
</body>
</html>