From 97884965f4e12773616c61fe42ad76079fddffbb Mon Sep 17 00:00:00 2001 From: haerong22 Date: Mon, 5 Jul 2021 21:03:26 +0900 Subject: [PATCH] comments --- .../thymeleaf/basic/BasicController.java | 6 +++++ .../resources/templates/basic/comments.html | 27 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 thymeleaf/src/main/resources/templates/basic/comments.html diff --git a/thymeleaf/src/main/java/com/example/thymeleaf/basic/BasicController.java b/thymeleaf/src/main/java/com/example/thymeleaf/basic/BasicController.java index e535f789..1e4221fd 100644 --- a/thymeleaf/src/main/java/com/example/thymeleaf/basic/BasicController.java +++ b/thymeleaf/src/main/java/com/example/thymeleaf/basic/BasicController.java @@ -102,6 +102,12 @@ public class BasicController { return "basic/condition"; } + @GetMapping("/comments") + public String comments(Model model) { + model.addAttribute("data", "Spring!"); + return "basic/comments"; + } + private void addUsers(Model model) { List list = new ArrayList<>(); list.add(new User("userA", 10)); diff --git a/thymeleaf/src/main/resources/templates/basic/comments.html b/thymeleaf/src/main/resources/templates/basic/comments.html new file mode 100644 index 00000000..fef436ff --- /dev/null +++ b/thymeleaf/src/main/resources/templates/basic/comments.html @@ -0,0 +1,27 @@ + + + + + Title + + +

예시

+html data +

1. 표준 HTML 주석

+ + +

2. 타임리프 파서 주석

+ + + html data + +

3. 타임리프 프로토타입 주석

+ + + \ No newline at end of file