TemplateEngine 的邮件模板不读取 html 标签

问题描述 投票:0回答:0

我有以下模板:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="UTF-8">
        <title>Template for reminder to team lead</title>
    </head>
    <body>
        <p>Hello<span th:text="${firstNameTeamLead}"></span> <span th:text="${lastNameTeamLead}">!</span> </p>
        <p></span> <span th:text="${member}"> !</span> did not:
        <span th:text="${lateSteps}"></span></p>
    </body>
</html>

lateStep
是一个包含列表的字符串,一些 html 标记用于显示带有项目符号的列表。事情是 html 没有被读取,我的邮件中只有一大块内容混合了 html 标签,如下所示:

Hello teamLeadFirstName teamLeadLastName !

memberName did not: <br /> <li><ul> fetch his food today </ul><ul> talk to the blacksmith </ul></li>

任何人都知道我该怎么做

java html template-engine
© www.soinside.com 2019 - 2024. All rights reserved.