본문 바로가기
실습기록

7월 25일 project - thymeleaf

by project100 2023. 7. 25.

https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#what-is-thymeleaf

 

Tutorial: Using Thymeleaf

1 Introducing Thymeleaf 1.1 What is Thymeleaf? Thymeleaf is a modern server-side Java template engine for both web and standalone environments, capable of processing HTML, XML, JavaScript, CSS and even plain text. The main goal of Thymeleaf is to provide a

www.thymeleaf.org

https://s-yeonjuu.tistory.com/6

 

Thymeleaf 사용법

타임리프(Thymeleaf)란 뷰 템플릿으로 컨트롤러에서 리턴된 데이터들을 페이지에 동적으로 렌더링 해줍니다. ※ Thymeleaf 사용법 : 타임리프 사용 시 기본 문법은 data-th-text, th:text 둘 중 아무거나 사

s-yeonjuu.tistory.com

 

Boolean literals

The boolean literals are true and false. For example:

<div th:if="${user.isAdmin()} == false"> ...

In this example, the == false is written outside the braces, and so it is Thymeleaf that takes care of it. If it were written inside the braces, it would be the responsibility of the OGNL/SpringEL engines:

<div th:if="${user.isAdmin() == false}"> ...

The null literal

The null literal can be also used:

<div th:if="${variable.something} == null"> ...