template might not exist or might not be accessible by any of the configured

template might not exist or might not be accessible by any of the configured,第1张

template might not exist or might not be accessible by any of the configured 报错信息

1、网页报错

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Thu Nov 11 16:30:35 CST 2021
There was an unexpected error (type=Internal Server Error, status=500).

2、idea报错

2021-11-11 16:30:35.393 ERROR 9556 --- [nio-8087-exec-2] org.thymeleaf.TemplateEngine             : 
[THYMELEAF][http-nio-8087-exec-2] Exception processing template "index_alt": 
Error resolving template [index_alt], template might not exist or might not be accessible by any of 
the configured Template Resolvers

org.thymeleaf.exceptions.TemplateInputException: Error resolving template [index_alt], 
template might not exist or might not be accessible by any of the configured Template Resolvers
原因和解决办法

1、报错时的HTML页面如下



2、解决办法后的HTML页面如下



3、原因
我使用的是idea创建的springboot项目,引用了thymeleaf模板,但是我最开始的html页面没有添加thymeleaf的头就报错了。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5437900.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-11
下一篇 2022-12-11

发表评论

登录后才能评论

评论列表(0条)

保存