From: Kai Moritz <kai@juplo.de> Date: Sun, 20 Sep 2020 13:05:12 +0000 (+0200) Subject: Added a customized error-page X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=f70e2fe4125d6a0a2d7c4eb2704c98e04052cda9;p=demos%2Ftesting Added a customized error-page --- diff --git a/src/main/resources/templates/error.html b/src/main/resources/templates/error.html new file mode 100644 index 0000000..e30ef9e --- /dev/null +++ b/src/main/resources/templates/error.html @@ -0,0 +1,50 @@ +<!doctype html> +<html xmlns:th="http://www.thymeleaf.org"> + <head> + <title th:text="|${status}: ${error}">XXX: ERROR</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + </head> + <body> + <h1 th:text="|${status}: ${error}">XXX: ERROR</h1> + <table> + <tbody> + <tr> + <th scope="row">Status</th> + <td th:text="${status}">ERROR.STATUS</td> + </tr> + <tr> + <th scope="row">Error</th> + <td th:text="${error}">ERROR.ERROR</td> + </tr> + <tr th:if="!${#strings.isEmpty(message)}"> + <th scope="row">Message</th> + <td th:text="${message}">ERROR.MESSAGE</td> + </tr> + <tr th:if="!${#strings.isEmpty(requestId)}"> + <th scope="row">Request-ID</th> + <td th:text="${requestId}">ERROR.REQUEST_ID</td> + </tr> + <tr> + <th scope="row">Timstamp</th> + <td th:text="${timestamp}">ERROR.TIMESTAMP</td> + </tr> + <tr th:if="!${#strings.isEmpty(path)}"> + <th scope="row">Path</th> + <td th:text="${path}">ERROR.PATH</td> + </tr> + <!--/**--> + <tr th:if="!${#strings.isEmpty(trace)}"> + <th scope="row">Trace</th> + <td> + <div> + <pre th:text="${trace}">ERROR.TRACE</pre> + </div> + </td> + </tr> + <!--**/--> + </tbody> + </table> + <p><a href="#" th:href="@{/}">Back to HOME</a> + </div> + </body> +</html>