728x90
if 부분
<div th:if="${board.fileList}">
else 부분
<div th:unless="${board.idx == null}">
<div th:unless="${board.idx == ''}">
도 가능
<div th:unless="${board.idx == 'gg'}">
<span>ㅎㅎ</span>
</div>
idx가 gg면 아래 ㅎㅎ 구문 가져오지마라는 뜻
정보를 준 사이트
https://webfirewood.tistory.com/94
thymeleaf에서 null check 하기(isEmpty)
오늘의 미션, 만약 view 단에서 보여줘야 하는 데이터가 없으면(아마도 DB에서 삭제된 경우) 프론트단에 데이터를 보여주는 div 태그를 없애야 한다. 아 그야 식은 죽 먹기죠. data가 null인지 아닌지
webfirewood.tistory.com
'개발 > Spring Boot' 카테고리의 다른 글
Thymeleaf 비교 연산, 리터럴 정보 좋은 사이트 (0) | 2022.07.28 |
---|---|
Thymeleaf controller에서 값 받아오기 및 th:each 등 사용법 값 받기 값 담아오기 (0) | 2022.07.28 |
Spring boot method put, delete 사용하려면 방법? (0) | 2022.07.27 |
[SpringBoot] 간단한 게시판 만들기 #3 - domain(Entity) 구현 (0) | 2022.07.19 |
intelij start.spring.io zip import (0) | 2022.07.18 |