Skip to content

Commit

Permalink
주석
Browse files Browse the repository at this point in the history
  • Loading branch information
kiteB committed Sep 21, 2021
1 parent 1412c2d commit d09fb61
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ public String condition(Model model) {
return "basic/condition";
}

@GetMapping("/comments")
public String comments(Model model) {
model.addAttribute("data", "Spring!");
return "basic/comments";
}

private void addUsers(Model model) {
List<User> list = new ArrayList<>();
list.add(new User("userA", 10));
Expand Down
24 changes: 24 additions & 0 deletions thymeleaf-basic/src/main/resources/templates/basic/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1>예시</h1>
<span th:text="${data}">html data</span>
<h1>1. 표준 HTML 주석</h1>
<!--
<span th:text="${data}">html data</span>
-->
<h1>2. 타임리프 파서 주석</h1>
<!--/* [[${data}]] */-->
<!--/*-->
<span th:text="${data}">html data</span>
<!--*/-->
<h1>3. 타임리프 프로토타입 주석</h1>
<!--/*/
<span th:text="${data}">html data</span>
/*/-->
</body>
</html>

0 comments on commit d09fb61

Please sign in to comment.