问题描述
不多说,直接上图。本身代码没啥问题,就是强迫症看着难受,如何去除呢?
解决方案
一、修改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>