타임리프 Thymeleaf

Jmnote (토론 | 기여)님의 2016년 6월 28일 (화) 15:35 판 (→‎개요)
  다른 뜻에 대해서는 time leap 문서를 참조하십시오.

1 개요

Thymeleaf
타임리프[1]
  • 자바 XML/XHTML/HTML5 템플릿 엔진
  • 스프링 프레임워크 MVC 지원
  • 아파치 라이선스 2.0
  • 특징: "Natural Templates"
HTML 형식[2]을 그대로 따름
브라우저에서 그대로 확인가능[3]

 

2 예시

<table>
  <thead>
    <tr>
      <th th:text="#{msgs.headers.name}">Name</th>
      <th th:text="#{msgs.headers.price}">Price</th>
    </tr>
  </thead>
  <tbody>
    <tr th:each="prod : ${allProducts}">
      <td th:text="${prod.name}">Oranges</td>
      <td th:text="${#numbers.formatDecimal(prod.price,1,2)}">0.99</td>
    </tr>
  </tbody>
</table>

3 같이 보기

4 참고 자료

  1. [taimliːf]
  2. XML, XHTML, HTML5 형식 지원
  3. 물론 변수값이 아닌 변수명이 나오겠지
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}