首页 > 其他 > 详细

IDEA编辑thymeleaf模板如何去除下划红线

时间:2020-10-31 23:54:46      阅读:50      评论:0      收藏:0      [点我收藏+]

问题描述

不多说,直接上图。本身代码没啥问题,就是强迫症看着难受,如何去除呢?

技术分享图片

解决方案

一、修改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>

参考资料

IDEA编辑thymeleaf模板如何去除下划红线

原文:https://www.cnblogs.com/summerday152/p/13907306.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!