diff --git a/thymeleaf/src/main/java/com/example/thymeleaf/basic/TemplateController.java b/thymeleaf/src/main/java/com/example/thymeleaf/basic/TemplateController.java index 5655772f..f7e81e84 100644 --- a/thymeleaf/src/main/java/com/example/thymeleaf/basic/TemplateController.java +++ b/thymeleaf/src/main/java/com/example/thymeleaf/basic/TemplateController.java @@ -17,4 +17,9 @@ public class TemplateController { public String layout() { return "template/layout/layoutMain"; } + + @GetMapping("/layoutExtend") + public String layoutExtends() { + return "template/layoutExtend/layoutExtendMain"; + } } diff --git a/thymeleaf/src/main/resources/templates/template/layoutExtend/layoutExtendMain.html b/thymeleaf/src/main/resources/templates/template/layoutExtend/layoutExtendMain.html new file mode 100644 index 00000000..0a20aa47 --- /dev/null +++ b/thymeleaf/src/main/resources/templates/template/layoutExtend/layoutExtendMain.html @@ -0,0 +1,13 @@ + + + + 메인 페이지 타이틀 + + +
+

메인 페이지 컨텐츠

+
메인 페이지 포함 내용
+
+ + \ No newline at end of file diff --git a/thymeleaf/src/main/resources/templates/template/layoutExtend/layoutFile.html b/thymeleaf/src/main/resources/templates/template/layoutExtend/layoutFile.html new file mode 100644 index 00000000..3ae1446b --- /dev/null +++ b/thymeleaf/src/main/resources/templates/template/layoutExtend/layoutFile.html @@ -0,0 +1,15 @@ + + + + 레이아웃 타이틀 + + +

레이아웃 H1

+
+

레이아웃 컨텐츠

+
+ + + \ No newline at end of file