IDEA編輯thymeleaf模板如何去除下划紅線


問題描述

不多說,直接上圖。本身代碼沒啥問題,就是強迫症看着難受,如何去除呢?

解決方案

一、修改IDEA針對thymeleaf表達式的報錯提醒級別

File->Settings->Editor->Inspections,搜索thymeleaf,右鍵Expression variables validation的級別,不是Error就行。

二、添加suppress ALL

<!DOCTYPE html>
<!--suppress ALL-->
<html xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="UTF-8">
        <title>Hello</title>
    </head>
    <body>
        點擊鏈接: <a href="http://www.hyhwky.com" th:href="${info}"></a>
    </body>
</html>

參考資料


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM