IT'S DO
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

 

profile

IT'S DO

@멋진놈

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!