アイデアの thymeleaf テンプレートでフローティングレッドの問題を削除する方法

目次

Thymeleaf 構文 (最も一般的に使用される)

アイデアの thymeleaf テンプレートでフローティングレッドの問題を削除する方法


Thymeleaf 構文 (最も一般的に使用される)

  1. 変数値 ${...} を取得

<!--エスケープなし--> 
<div th:text="${msg}"></div> 
<!--エスケープ--> 
<div th:utext="${msg}">< /div >
  1. リンク式: @{…} 、同様のタグ:th:hrefおよびth:src

<a href="details.html" th:href="@{/order/details(orderId=${o.id})}">表示</a>
  1. サイクル

model.addAttribute("users", Arrays.asList("aaa","bbb"));
<h2 th:each="user:${users}" th:text="${user}"></h2> <!--< 
h2 th:each="user:${users}">[[ ${user}]]</h2>-->

アイデアの thymeleaf テンプレートでフローティングレッドの問題を削除する方法

設定を開く

 エディターを選択し、インスペクションを開きます

 thymeleaf を検索し、[式変数の検証] オプションの後ろにあるチェック ボックスを削除し、最後に [適用] をクリックします。

 はためく赤が消えた

おすすめ

転載: blog.csdn.net/qq_44765534/article/details/125907151
おすすめ