<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org">

<head>

    <title th:text="${title}">Report mail</title>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

</head>

<body>

    <h1>Send Test Report Email</h1>

    <table>

        <thead>

        </thead>

        <tbody>

        <colcolgroup>

        <col style="width: 100px;"/>

        <col/>

        </colcolgroup>

            <tr>

                <td th:text="#{mail.th.project.id}">Proejct</td>

                <td th:text="${projectId}">Project</td>

            </tr>

            <tr>

                <td th:text="#{mail.th.sub.project.id}">Sub Project</td>

                <td th:text="${subProjectId}">Sub Project</td>

            </tr>

            <tr>

                <td th:text="#{mail.th.duration}">Duration</td>

                <td th:text="${duration}">Duration</td>

            </tr>

            <tr>

                <td th:text="#{mail.th.format}">Report Format</td>

                <td th:text="${format}">Document</td>

            </tr>

            <tr>

                <td th:text="#{mail.th.start.datetime}">Start Datetime</td>

                <td th:text="${startDateTime}"></td>

            </tr>

            <tr>

                <th th:text="#{mail.th.end.datetime}">End Datetime</th>

                <td th:text="${endDateTime}"></td>

            </tr>

        </tbody>

    </table>

</body>

</html> 

위의 템플릿 코드는 그대로 둔 채,

<!-- Thymeleaf template -->

<dependency>

    <groupId>org.thymeleaf</groupId>

    <artifactId>thymeleaf</artifactId>

    <version>2.0.17</version>

</dependency>

<dependency>

    <groupId>org.thymeleaf</groupId>

    <artifactId>thymeleaf-spring3</artifactId>

    <version>2.0.17</version>

</dependency>

아래의 오류가 발생한다. 

ERROR: org.thymeleaf.TemplateEngine - [THYMELEAF][http-bio-8080-exec-7] Exception processing template "report/testReportMail": Exception evaluating SpringEL expression: "title" (report/testReportMail:4)

thymeleaf 의 version을 2.0.17 에서 2.0.16으로 변경해보자.

정상동작한다. 

현재 사용하고 있는 스프링은 '3.2.0.RELEASE'


+ Recent posts