zl程序教程

您现在的位置是:首页 >  后端

当前栏目

Spring Boot 之Thymeleaf的爆红用注解【<!--/*@thymesVar id=“data“ type=“ch“*/-->】解决

SpringBoot 解决 -- Data ID 注解 type
2023-09-14 09:04:53 时间

问题:data 爆红

解决办法一:通过Alt+Enter进行自动生成的注释,补全IDEA;如果不加,IDEA将会报错cannot reslove

<!--/*@thymesVar id="data" type="ch"*/-->

解决办法二:通过Alt+Enter选择Edit inspection profile setting修改

可以将error改成Warning,或者将√取消掉

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>SpringBoot集成Thymeleaf</title>
</head>
<body>
<!--Thymeleaf前端框架以Html为载体-->

<span th:text="${data}"></span>
<span th:text="${data}"></span>
<p th:text="${data}"></p>
<div th:text="${data}"></div>
</body>
</html>