comments
This commit is contained in:
@@ -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<User> list = new ArrayList<>();
|
||||
list.add(new User("userA", 10));
|
||||
|
||||
27
thymeleaf/src/main/resources/templates/basic/comments.html
Normal file
27
thymeleaf/src/main/resources/templates/basic/comments.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user