공부/Spring
스프링 부트 3 백엔드 개발자 되기_13
구르는너구리
2023. 8. 21. 07:37
newArticle.html에
<!-- id가 있을 때는 수정 버튼을 없을 때는 등록 버튼이 보이게 함 -->
<button th:if="${article.id} != null" type="button" id="modify-btn"
class="btn btn-primary btn-sm">수정</button>
<button th:if="${article.id} == null" type="button" id="create-btn"
class="btn btn-primary btn-sm">등록</button>
<button th:if="${article.id} != null" type="button" id="modify-btn"
class="btn btn-primary btn-sm">수정</button>
<button th:if="${article.id} == null" type="button" id="create-btn"
class="btn btn-primary btn-sm">등록</button>
수정부분 빼먹어서 수정이 안됐었던 거임