<th:block th:if="${board.creationTime.after(#dates.createToday())}">
<div><img th:src="@{/img/New.png}" style="width:50px; height:20px;"></div>
</th:block>
게시글의 시간과 dates.createToday()의 시간을 비교하여 NEW를 붙이게 된다.
@CreationTimestamp
private Date creationTime;
'자바의 봄(Spring) > 프로젝트' 카테고리의 다른 글
공부하면서 만들어가는 REST-API 프로젝트 - 2 (0) | 2024.03.09 |
---|---|
공부하면서 만들어가는 REST-API 프로젝트 (0) | 2024.03.07 |
SpringBoot 부하 테스트 후기 (1) | 2022.07.23 |
7.스프링부트로 게시판 만들기 - 스프링 시큐리티 적용해서 회원가입 (0) | 2022.04.20 |
6. 스프링부트로 게시판 만들기 - 유저 정보 관리 페이지 작성하기 (0) | 2022.04.17 |
댓글