Error resolving template xxx, template might not exist or...

报错:org.thymeleaf.exceptions.TemplateInputException: Error resolving template [XXX], template might not exist or might not be accessible by any of the configured Template Resolvers

环境:IDEA+springboot + thymeleaf
当遇到这样的问题,而配置检查没有问题,很有可能是html页面第一次运行时,在上面出现了些无法识别的红色波浪,如下
在这里插入图片描述
这些波浪部分其实往往是正确的,但是由于IDEA的一些bug不能被识别,可以运行

解决办法:
将波浪部分全部注释掉,然后成功运行出页面之后,在去掉注释,重新加载项目,再访问就不会报错了

发布了34 篇原创文章 · 获赞 22 · 访问量 8728

猜你喜欢

转载自blog.csdn.net/qq_41247335/article/details/104221493
今日推荐