티스토리 뷰

728x90
<div th:if="${not #strings.isEmpty(examData)}"> ... </div>

https://webfirewood.tistory.com/94

 

thymeleaf에서 null check 하기(isEmpty)

오늘의 미션, 만약 view 단에서 보여줘야 하는 데이터가 없으면(아마도 DB에서 삭제된 경우) 프론트단에 데이터를 보여주는 div 태그를 없애야 한다. 아 그야 식은 죽 먹기죠. data가 null인지 아닌지

webfirewood.tistory.com

 

728x90
댓글