Thymeleaf namespace in html files display errors in Netbeans - How can I get it pass HTML checking?

前端 未结 2 896
[愿得一人]
[愿得一人] 2021-01-18 05:22

Netbeans HTML checking doesn\'t like my thymeleaf namespace.

Here is my HTML Thymleaf file:



        
相关标签:
2条回答
  • 2021-01-18 05:49

    Try to fix it in this way you may ignore spring security thing.

        <!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>
    
    0 讨论(0)
  • 2021-01-18 05:54

    I found out how to disable these errors when I was taking this spring security tutorial

    Simply by adding this to html tag:

    xmlns="http://www.w3.org/1999/xhtml"
    

    what's even cooler, netbeans now tracks if you closed every tag with slash "/" in document.

    0 讨论(0)
提交回复
热议问题