【发布时间】:2019-05-21 22:57:43
【问题描述】:
我有一个来自后端的响应,它将显示在我的 html 页面上。我使用 thyeleaf 作为前端。后端响应本身就是一个 html 代码。在当前情况下,我的视图按原样显示该响应。我正在寻找的是让 html 响应以 html 格式显示,即没有那些 html、body 标签等,这样看起来会更好。
这是我的 html 响应,我需要在视图中以 html 格式显示。
<HTML> <HEAD></HEAD><BODY><PRE> Checking oracle status for instance jsx (performs a tnsping to jsx) ========================================================== jsx TNS failure - unable to test database status from server apsrs0170 Could not perform a database connection test from central server. Looks like TNS is not setup for this database. Please open up Additional Services Request for DBA group to fix the issue. ESC_SCRIPT_FAILURE
我需要使用此响应的 html 代码:
<tr>
<th style="vertical-align: top">Message</th>
<td th:text="${responseMessage}"></td>
</tr>
这里的 responseMessage 是 html 响应。
【问题讨论】:
-
你必须像这样显示为inninterHtml。
标签: java html spring spring-boot