美文网首页
【SpringBoot】不严格的HTML5

【SpringBoot】不严格的HTML5

作者: 如雨随行2020 | 来源:发表于2022-01-04 01:19 被阅读0次

在实际项目中可能有不太严格的HTML格式,此时thymeleaf默认mode=HTML5,这将会对非严格的报错可以如下配置
application.propreties文件:

spring.thymeleaf.mode=LEGACYHTML5

pom.xml文件:

        <dependency>
            <groupId>net.sourceforge.nekohtml</groupId>
            <artifactId>nekohtml</artifactId>
        </dependency>

注意不要使用1.5以前的版本。

相关文章

网友评论

      本文标题:【SpringBoot】不严格的HTML5

      本文链接:https://www.haomeiwen.com/subject/keyraltx.html