How to remove the floating red problem in the thymeleaf template in idea

Table of contents

Thymeleaf syntax (most commonly used)

How to remove the floating red problem in the thymeleaf template in idea


Thymeleaf syntax (most commonly used)

  1. get variable value ${...}

<!--Do not escape-->
<div th:text="${msg}"></div>
<!--Escape-->
<div th:utext="${msg}"></div>
  1. Link expression: @{…} , similar tags are: th:hrefandth:src

<a href="details.html" th:href="@{/order/details(orderId=${o.id})}">view</a>
  1. cycle

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

How to remove the floating red problem in the thymeleaf template in idea

open settings

 Select editor, then open Inspections

 Search for thymeleaf and remove the check box behind the Expression variables validation option, and finally click Apply

 Fluttering red has disappeared

Guess you like

Origin blog.csdn.net/qq_44765534/article/details/125907151