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