Netbeans HTML 检查不喜欢我的 thymeleaf 命名空间。
这是我的 HTML Thymleaf 文件:
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head">
<object th:include="fragments/meta :: meta" th:remove="tag" />
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Open+Sans:300italic,400,300,700' rel='stylesheet' type='text/css'/>
<link href="/../../../webjars/Semantic-UI/2.0.6/semantic.min.css" rel="stylesheet" th:href="@{/webjars/Semantic-UI/2.0.6/semantic.min.css}"/>
<link href="../../../css/core.css" rel="stylesheet" th:href="@{/css/core.css}" />
<link href="../../../css/product.css" rel="stylesheet" th:href="@{/css/product.css}" />
</head>
<body>
</body>
</html>
这是 Netbeans 中显示的错误:
如何让 Netbeans 与 Thymeleaf 完美搭配?
最佳答案
尝试以这种方式修复它,您可能会忽略 spring 安全问题。
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
<meta charset="utf-8"/>
<title>Sample</title>
<link th:href="@{/resources/css/bootstrap.css}" rel="stylesheet" type="text/css"/>
<link th:href="@{/resources/css/bootstrap-theme.css}" rel="stylesheet" type="text/css"/>
</head>
关于java - html 文件中的 Thymeleaf 命名空间在 Netbeans 中显示错误 - 如何让它通过 HTML 检查?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31603581/