thymeleaf 标签必须由匹配的结束标记终止

解决方法:在pom.xml中添加依赖:

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

在application.yml中添加配置:

spring:
thymeleaf:
  mode: LEGACYHTML5

猜你喜欢

转载自blog.csdn.net/wangxi_xixi/article/details/81906736