
[ Spring Boot ] 스프링MVC & Thymeleaf part.3
·
Spring Boot
Thymeleaf 레이아웃1. include방식SampleController //include방식 처리 @GetMapping("/exLayout1") public void exLayout1() { log.info("exLayout---------"); } fragment1.html Part 1 Part 2 Part 3 exLayout1.htmlFragment TestLayout 1 - 1Layout 1 - 2Layout 1 - 3 exLayout1.html이 fragment1.html의 조각들을 가져와서 사용한다.th:replace: 기존의 내용 완전히 대체th:insert : 기존의 내용의 바깥쪽 태그 유지하고 내용 추가하기 2. 레이아웃 템플릿 만들기..