xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"

코딩 개발/Spring

Thymeleaf - layout 나누기

기존에 JSTL로 layout을 경험해 본 적이 있기 때문에 thymeleaf의 layout은 재밌게 느껴졌습니다. import로 불러오는 것과 비슷하게 th:replace , th:fragment와 layout:fragment를 이용하여 header, footer, 본문 내용을 불러오도록 해보겠습니다. Header , Footer 제작 및 불러오기 layout이라는 틀에 내용만 붙이면 됩니다. 위에 보시면 xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" 문장도 넣어줘야 합니다. 보시면 header의 id 값을 넣은 것 보이시나요? fragments/header라고 명시하고 :: 콜론 두 개를 작성하고 할당한 아이디 값을 넣어주었습니다. footer도..

호소세
'xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"' 태그의 글 목록