thymeleaf 模板对 HTML 文件标签内容太严格的解决方式。
1. 在 application.properties 文件中添加如下配置:
spring.thymeleaf.mode=LEGACYHTML5
2. 对于 maven 用户,在 pom.xml 的 dependencies 中添加如下依赖:
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
</dependency>
相关文章