1.检查resource下xml配置路径(没有问题)
2.检查文件存放的路径,templates(需要导入thymeleaf)
3.最后检查thymeleaf的版本
原来的版本是
thymeleaf-spring4,导致的错误
<!--thymeleaf-->
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring5</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-java8time</artifactId>
</dependency>
解决Thymeleaf模板问题
本文介绍了解决Thymeleaf版本不匹配导致的模板加载失败问题的过程,包括检查资源路径、确认模板存放位置及调整Thymeleaf依赖版本。

2333

被折叠的 条评论
为什么被折叠?



