@GetMapping("/thymeleaf")
public String thymeleaf(Model model) {
model.addAttribute("message", "<h1>th:text</h1>");
return "thymeleaf_test";
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<p th:text="${message}"></p>
<p th:utext="${message}"></p>
</body>
</html>

th:textth:utext