Error resolving template [grade/list], template might not exist or might not be accessible by any of the configured Template Resolvers
时间: 2023-10-12 15:55:16 浏览: 84
引用\[1\]:解决:org.thymeleaf.exceptions.TemplateInputException: Error resolving template \[index\], template might not exist or might not be accessible by any of the configured Template Resolvers 。
引用\[2\]:这么多错误信息,我们只要关注这句话:Error resolving template \[auth/login\], template might not exist or might not be accessible by any of the configured Template Resolvers,这句话是什么意思呢?
引用\[3\]:一、问题: Error resolving template \[/index\], template might not exist or might not be accessible by any of the configured Template Resolvers出现在 SpringBoot 项目使用 java -jar 运行时 二、解决 分别检查下面三个地方 2.1 在 pom.xml 中添加 thymeleaf 依赖 没有的话加下,有的话不用加 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> 2.2 application.yml添加相应的thymeleaf 的配置 我原先的配置不全,是错误的需要修改成下面这样 thymeleaf: prefix: classpath:/templates/ #prefix:指定模板所在的目录 check-template-location: true #check-tempate-location: 检查模板路径是否存在 cache: false #cache: 是否缓存,开发模式下设置为false,避免改了模板还要重启服务器,线上设置为true,可以提高性能。 suffix: .html #encoding: UTF-8 #content-type: text/html mode: HTML5 示例图(方便大家对应着看) 。
问题:Error resolving template \[grade/list\], template might not exist or might not be accessible by any of the configured Template Resolvers
回答: 这个错误信息是关于模板解析的问题。它表示模板解析器无法找到或访问指定的模板。\[1\]具体来说,它可能是因为模板不存在或者无法被配置的模板解析器访问到。\[2\]解决这个问题的方法有几个步骤。首先,检查项目的pom.xml文件中是否添加了thymeleaf依赖,如果没有则需要添加。\[3\]其次,检查application.yml文件中的thymeleaf配置是否正确,包括指定模板所在的目录、检查模板路径是否存在、是否缓存等。最后,确保模板文件存在于指定的目录中,并且文件名和路径与代码中的引用一致。这样就可以解决模板解析的问题了。
#### 引用[.reference_title]
- *1* [Error resolving template [index], template might not exist or might not be accessible by any of the](https://blog.csdn.net/weixin_45790889/article/details/127026694)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [解决Error resolving template [x] template might not exist or might not be accessible by any of the ...](https://blog.csdn.net/lvoelife/article/details/126450694)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Error resolving template [], template might not exist or might not be accessible by any of the conf](https://blog.csdn.net/qq_43377749/article/details/115468087)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文
相关推荐



















